public abstract class AbstractTransport extends Object implements Transport
Modifier and Type | Field and Description |
---|---|
protected org.apache.mina.core.service.IoAcceptor |
acceptor
The IoAcceptor used to accept requests
|
protected static int |
DEFAULT_BACKLOG_NB
The default backlog queue size
|
protected static int |
DEFAULT_NB_THREADS
The default number of threads
|
protected static String |
LOCAL_HOST
The default hostname
|
Constructor and Description |
---|
AbstractTransport()
Creates an instance of an Abstract Transport class.
|
AbstractTransport(int port)
Creates an instance of an Abstract Transport class, using localhost
and port.
|
AbstractTransport(int port,
int nbThreads)
Creates an instance of an Abstract Transport class, using localhost
and port.
|
AbstractTransport(int port,
int nbThreads,
int backLog)
Creates an instance of the AbstractTransport class on LocalHost
|
AbstractTransport(String address,
int port)
Creates an instance of an Abstract Transport class, using the given address
and port.
|
AbstractTransport(String address,
int port,
int nbThreads,
int backLog)
Creates an instance of the AbstractTransport class
|
Modifier and Type | Method and Description |
---|---|
void |
enableSSL(boolean sslEnabled)
Enable or disable SSL
|
String |
getAddress() |
int |
getBackLog() |
boolean |
getEnableSSL() |
int |
getNbThreads() |
int |
getPort()
Gets the port for this service.
|
boolean |
isSSLEnabled() |
void |
setAddress(String address)
Stores the Address in this transport
|
void |
setBackLog(int backLog)
Set the size of the messages queue waiting for the acceptor to
be ready.
|
void |
setEnableSSL(boolean sslEnabled)
Enable or disable SSL
|
void |
setNbThreads(int nbThreads)
Set the number of processing threads for the acceptor
|
void |
setPort(int port)
Sets the port for this service.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAcceptor, init
protected org.apache.mina.core.service.IoAcceptor acceptor
protected static final int DEFAULT_BACKLOG_NB
protected static final String LOCAL_HOST
protected static final int DEFAULT_NB_THREADS
public AbstractTransport()
public AbstractTransport(int port)
port
- The portpublic AbstractTransport(int port, int nbThreads)
port
- The portnbThreads
- The number of threads to create in the acceptorpublic AbstractTransport(String address, int port)
address
- The addressport
- The portpublic AbstractTransport(int port, int nbThreads, int backLog)
port
- The portnbThreads
- The number of threads to create in the acceptorbackLog
- The queue size for incoming messages, waiting for the
acceptor to be readypublic AbstractTransport(String address, int port, int nbThreads, int backLog)
address
- The addressport
- The portnbThreads
- The number of threads to create in the acceptorbackLog
- The queue size for incoming messages, waiting for the
acceptor to be readypublic int getPort()
public void setPort(int port)
public String getAddress()
getAddress
in interface Transport
public void setAddress(String address)
setAddress
in interface Transport
address
- the Address to storepublic int getNbThreads()
getNbThreads
in interface Transport
public void setNbThreads(int nbThreads)
setNbThreads
in interface Transport
nbThreads
- The number of threads to create in the acceptorpublic int getBackLog()
getBackLog
in interface Transport
public void setBackLog(int backLog)
setBackLog
in interface Transport
backLog
- The queue sizepublic void setEnableSSL(boolean sslEnabled)
setEnableSSL
in interface Transport
sslEnabled
- if true
, SSL is enabled.public void enableSSL(boolean sslEnabled)
public boolean isSSLEnabled()
isSSLEnabled
in interface Transport
true
id SSL is enabled for this transportpublic boolean getEnableSSL()
true
id SSL is enabled for this transportpublic String toString()
toString
in class Object
Object.toString()
Copyright © 2003–2020 The Apache Software Foundation. All rights reserved.