|
HOME | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ireasoning.core.jmx.AdaptorServer
Abstract base class of JMX adaptor
Field Summary | |
protected com.ireasoning.core.network.DataHandler |
_dataHandler
|
protected com.ireasoning.core.network.DataHandlerFactory |
_dataHandlerFactory
|
protected InetAddress |
_ipAddress
|
protected int |
_maxConnections
|
protected MBeanInfo |
_mbeaninfo
|
protected MBeanServer |
_mbeanServer
|
protected ObjectName |
_objectName
|
protected int |
_port
|
protected Object |
_serverSocket
|
protected SocketServer |
_socketServer
|
protected long |
_startTime
|
protected int |
_state
|
protected int |
_transportLayerType
|
static int |
MAX_CONNECTIONS
Maximum number of connections |
static int |
RECV_BUF_SIZE
Receive buffer size |
static String |
SNMP
Snmp protocol |
static int |
TCP
TCP transport layer |
protected static int |
TCP_TL1
|
static String |
TL1
TL1 protocol |
static int |
UDP
Snmp transport layer |
Fields inherited from interface com.ireasoning.core.jmx.State |
STARTED, STARTING, STATES, STOPPED, STOPPING, UNINITIALIZED |
Constructor Summary | |
protected |
AdaptorServer(MBeanServer server,
int port)
Constructor |
protected |
AdaptorServer(MBeanServer server,
int port,
int transportLayerType,
com.ireasoning.core.network.DataHandler handler)
Constructor |
protected |
AdaptorServer(MBeanServer server,
int port,
int transportLayerType,
com.ireasoning.core.network.DataHandlerFactory handlerFactory)
Constructor |
Method Summary | |
int |
getActiveClientCount()
Returns the number of active client |
String |
getHost()
Gets host name |
String |
getName()
Returns adaptor name |
static String |
getObjectName(String adaptorName,
InetAddress address,
int port)
Return the object name based on passed adaptorName, ip address and port number |
static String |
getObjectName(String adaptorName,
int port)
Return the object name based on passed adaptorName and port number |
int |
getPort()
Returns the server port |
abstract String |
getProtocol()
Returns the protocol name |
Object |
getServerSocket()
Returns the server socket |
int |
getState()
Returns the server state |
String |
getStateString()
Returns the server state as string format |
long |
getUptime()
Returns the server up time |
void |
postDeregister()
Gets called after MBean is unregistered |
void |
postRegister(Boolean b)
Gets called after MBean is registered |
void |
preDeregister()
|
ObjectName |
preRegister(MBeanServer mbeanserver,
ObjectName objectname)
|
void |
run()
|
void |
setIpAddress(InetAddress address)
Sets server's local address to bind |
void |
setMaxConnections(int maxConns)
Sets max. |
void |
setPort(int port)
Sets server port. |
void |
startService()
Starts server |
void |
stopService()
Stops server |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int MAX_CONNECTIONS
public static final int RECV_BUF_SIZE
public static final int TCP
public static final int UDP
protected static final int TCP_TL1
public static final String TL1
public static final String SNMP
protected int _port
protected InetAddress _ipAddress
protected MBeanServer _mbeanServer
protected ObjectName _objectName
protected SocketServer _socketServer
protected Object _serverSocket
protected MBeanInfo _mbeaninfo
protected long _startTime
protected int _maxConnections
protected int _transportLayerType
protected com.ireasoning.core.network.DataHandlerFactory _dataHandlerFactory
protected com.ireasoning.core.network.DataHandler _dataHandler
protected int _state
Constructor Detail |
protected AdaptorServer(MBeanServer server, int port)
server
- MBeanServer instanceport
- server port numberprotected AdaptorServer(MBeanServer server, int port, int transportLayerType, com.ireasoning.core.network.DataHandlerFactory handlerFactory)
transportLayerType
- transport layer type, one of AdaptorServer.TCP and AdaptorServer.UDPprotected AdaptorServer(MBeanServer server, int port, int transportLayerType, com.ireasoning.core.network.DataHandler handler)
transportLayerType
- transport layer type, one of AdaptorServer.TCP and AdaptorServer.UDPMethod Detail |
public Object getServerSocket()
getServerSocket
in interface AdaptorServerMBean
public void setPort(int port)
setPort
in interface AdaptorServerMBean
port
- new port numberpublic void setIpAddress(InetAddress address)
setIpAddress
in interface AdaptorServerMBean
public void setMaxConnections(int maxConns)
setMaxConnections
in interface AdaptorServerMBean
public String getHost() throws UnknownHostException
getHost
in interface AdaptorServerMBean
UnknownHostException
public int getPort()
getPort
in interface AdaptorServerMBean
public void run()
run
in interface Runnable
public void startService() throws Exception
startService
in interface Service
Exception
public void stopService()
stopService
in interface Service
public int getState()
getState
in interface State
public String getStateString()
getStateString
in interface State
public String getName()
getName
in interface ServiceMBean
public long getUptime()
getUptime
in interface AdaptorServerMBean
public int getActiveClientCount()
getActiveClientCount
in interface AdaptorServerMBean
public void postDeregister()
postDeregister
in interface MBeanRegistration
public void postRegister(Boolean b)
postRegister
in interface MBeanRegistration
public void preDeregister() throws Exception
preDeregister
in interface MBeanRegistration
Exception
public ObjectName preRegister(MBeanServer mbeanserver, ObjectName objectname) throws Exception
preRegister
in interface MBeanRegistration
Exception
public static String getObjectName(String adaptorName, InetAddress address, int port)
public static String getObjectName(String adaptorName, int port)
public abstract String getProtocol()
getProtocol
in interface AdaptorServerMBean
|
HOME | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |