public class TcpTransport extends AbstractTransport
| Modifier and Type | Field and Description |
|---|---|
private java.util.List<java.lang.String> |
cipherSuite
The list of enabled ciphers
|
private java.util.List<java.lang.String> |
enabledProtocols
The list of enabled protocols
|
private static org.slf4j.Logger |
LOG
A logger for this class
|
private boolean |
needClientAuth
The SSL 'needClientAuth' flag
|
private boolean |
wantClientAuth
The SSL 'wantClientAuth' flag
|
acceptor, DEFAULT_BACKLOG_NB, DEFAULT_NB_THREADS, LOCAL_HOST| Constructor and Description |
|---|
TcpTransport()
Creates an instance of the TcpTransport class
|
TcpTransport(int tcpPort)
Creates an instance of the TcpTransport class on localhost
|
TcpTransport(int tcpPort,
int nbThreads)
Creates an instance of the TcpTransport class on localhost
|
TcpTransport(int tcpPort,
int nbThreads,
int backLog)
Creates an instance of the TcpTransport class on localhost
|
TcpTransport(java.lang.String address,
int tcpPort)
Creates an instance of the TcpTransport class
|
TcpTransport(java.lang.String address,
int tcpPort,
int nbThreads,
int backLog)
Creates an instance of the TcpTransport class
|
| Modifier and Type | Method and Description |
|---|---|
private org.apache.mina.core.service.IoAcceptor |
createAcceptor(java.lang.String address,
int port,
int nbThreads,
int backLog)
Helper method to create an IoAcceptor
|
org.apache.mina.transport.socket.SocketAcceptor |
getAcceptor() |
java.util.List<java.lang.String> |
getCipherSuite() |
java.util.List<java.lang.String> |
getEnabledProtocols() |
void |
init()
Initialize the Acceptor if needed
|
boolean |
isNeedClientAuth() |
boolean |
isWantClientAuth() |
void |
setEnabledCiphers(java.util.List<java.lang.String> cipherSuite)
Set the list of enabled ciphers
|
void |
setEnabledProtocols(java.util.List<java.lang.String> enabledProtocols)
Set the list of enabled protocols
|
void |
setNeedClientAuth(boolean needClientAuth)
Set the needClientAuth SSL flag
|
void |
setWantClientAuth(boolean wantClientAuth)
Set the wantClientAuth SSL flag
|
java.lang.String |
toString() |
enableSSL, getAddress, getBackLog, getEnableSSL, getNbThreads, getPort, isSSLEnabled, setAddress, setBackLog, setEnableSSL, setNbThreads, setPortprivate boolean needClientAuth
private boolean wantClientAuth
private java.util.List<java.lang.String> enabledProtocols
private java.util.List<java.lang.String> cipherSuite
private static final org.slf4j.Logger LOG
public TcpTransport()
public TcpTransport(int tcpPort)
tcpPort - The portpublic TcpTransport(int tcpPort,
int nbThreads)
tcpPort - The portnbThreads - The number of threads to create in the acceptorpublic TcpTransport(java.lang.String address,
int tcpPort)
address - The addresstcpPort - The portpublic TcpTransport(int tcpPort,
int nbThreads,
int backLog)
throws java.net.UnknownHostException
tcpPort - The portnbThreads - The number of threads to create in the acceptorbackLog - The queue size for incoming messages, waiting for the
acceptor to be readyjava.net.UnknownHostExceptionpublic TcpTransport(java.lang.String address,
int tcpPort,
int nbThreads,
int backLog)
address - The addresstcpPort - The portnbThreads - The number of threads to create in the acceptorbackLog - The queue size for incoming messages, waiting for the
acceptor to be readypublic void init()
init in interface Transportinit in class AbstractTransportprivate org.apache.mina.core.service.IoAcceptor createAcceptor(java.lang.String address,
int port,
int nbThreads,
int backLog)
public org.apache.mina.transport.socket.SocketAcceptor getAcceptor()
AbstractTransportgetAcceptor in interface TransportgetAcceptor in class AbstractTransportpublic void setNeedClientAuth(boolean needClientAuth)
needClientAuth - the flag to setpublic boolean isNeedClientAuth()
true if the NeedClientAuth SSL flag is setpublic void setWantClientAuth(boolean wantClientAuth)
wantClientAuth - the flag to setpublic boolean isWantClientAuth()
true if the WantClientAuth SSL flag is setpublic java.util.List<java.lang.String> getEnabledProtocols()
public void setEnabledProtocols(java.util.List<java.lang.String> enabledProtocols)
enabledProtocols - The list of enabled protocolspublic java.util.List<java.lang.String> getCipherSuite()
public void setEnabledCiphers(java.util.List<java.lang.String> cipherSuite)
enabledCiphers - The list of enabled cipherspublic java.lang.String toString()
toString in class AbstractTransportObject.toString()