|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.joram.mom.proxies.tcp.TcpProxyService
public class TcpProxyService
Starts a TCP entry point for MOM clients.
Field Summary | |
---|---|
static java.lang.String |
BACKLOG_PROP
Name the property that allow to fix the TCP BACKLOG property for the client's connections. |
static int |
DEFAULT_BACKLOG
Default value for the TCP BACKLOG property. |
static java.lang.String |
DEFAULT_BINDADDRESS
Default IP address for binding the listen socket. |
static int |
DEFAULT_POOL_SIZE
Default value for the pool size. |
static int |
DEFAULT_PORT
Default value for the TCP port of the listen socket. |
static int |
DEFAULT_SO_TIMEOUT
Default value for the TCP SO_TIMEOUT property. |
static org.objectweb.util.monolog.api.Logger |
logger
logger |
static java.lang.String |
POOL_SIZE_PROP
Name the property that allow to fix the pool size for the connection's listener. |
static java.lang.String |
SO_TIMEOUT_PROP
Name the property that allow to fix the TCP SO_TIMEOUT property for the client's connections. |
Constructor Summary | |
---|---|
TcpProxyService(int port,
int backlog,
java.lang.String address)
|
Method Summary | |
---|---|
void |
activate()
Activates the connection manager. |
void |
closeAllConnections()
Closes all opened connections. |
protected java.net.ServerSocket |
createServerSocket(int port,
int backlog,
java.lang.String address)
Initialize the listening socket. |
void |
deactivate()
Deactivates the connection manager. |
int |
getFailedLoginCount()
Gets the number of connections rejected due to a failed authentication. |
int |
getInitiatedConnectionCount()
Gets the number of initiated connections since server start. |
java.lang.String |
getMBeanName()
Gets the name of the MBean. |
int |
getProtocolErrorCount()
Gets the number of connections rejected due to a wrong protocol header. |
int |
getRunningConnectionsCount()
Gets the number of living connections. |
java.lang.String |
getServerAddress()
Gets the socket address of the server. |
int |
getTcpListenersPoolSize()
Gets the number of threads listening for incoming tcp connections. |
static void |
init(java.lang.String args,
boolean firstTime)
Initializes the TCP entry point by creating a server socket listening to the specified port. |
boolean |
isActivated()
Tells if the ConnectionManager is active. |
protected void |
resetServerSocket()
Closes the listening socket and sets the variable to null. |
protected void |
start()
|
static void |
stopService()
Stops the service. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static org.objectweb.util.monolog.api.Logger logger
public static final java.lang.String SO_TIMEOUT_PROP
public static final int DEFAULT_SO_TIMEOUT
public static final java.lang.String POOL_SIZE_PROP
public static final int DEFAULT_POOL_SIZE
public static final java.lang.String BACKLOG_PROP
public static final int DEFAULT_BACKLOG
public static final int DEFAULT_PORT
public static final java.lang.String DEFAULT_BINDADDRESS
Constructor Detail |
---|
public TcpProxyService(int port, int backlog, java.lang.String address) throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
protected void resetServerSocket()
protected java.net.ServerSocket createServerSocket(int port, int backlog, java.lang.String address) throws java.lang.Exception
port
- backlog
- address
-
java.lang.Exception
public static void init(java.lang.String args, boolean firstTime) throws java.lang.Exception
args
- stringified listening portfirstTime
- true
when the agent server starts.
java.lang.Exception
public static void stopService()
protected void start()
public java.lang.String getMBeanName()
ConnectionManagerMBean
getMBeanName
in interface ConnectionManagerMBean
public void activate()
ConnectionManagerMBean
activate
in interface ConnectionManagerMBean
public void closeAllConnections()
ConnectionManagerMBean
closeAllConnections
in interface ConnectionManagerMBean
public void deactivate()
ConnectionManagerMBean
deactivate
in interface ConnectionManagerMBean
public boolean isActivated()
ConnectionManagerMBean
isActivated
in interface ConnectionManagerMBean
public int getRunningConnectionsCount()
ConnectionManagerMBean
getRunningConnectionsCount
in interface ConnectionManagerMBean
public int getTcpListenersPoolSize()
TcpProxyServiceMBean
getTcpListenersPoolSize
in interface TcpProxyServiceMBean
public java.lang.String getServerAddress()
TcpProxyServiceMBean
getServerAddress
in interface TcpProxyServiceMBean
public int getFailedLoginCount()
ConnectionManagerMBean
getFailedLoginCount
in interface ConnectionManagerMBean
public int getInitiatedConnectionCount()
ConnectionManagerMBean
getInitiatedConnectionCount
in interface ConnectionManagerMBean
public int getProtocolErrorCount()
TcpProxyServiceMBean
getProtocolErrorCount
in interface TcpProxyServiceMBean
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |