com.caucho.server.cluster
Class ServerConnectorAdmin

java.lang.Object
  extended by com.caucho.management.server.AbstractManagedObject
      extended by com.caucho.server.cluster.ServerConnectorAdmin
All Implemented Interfaces:
ManagedObjectMXBean, ServerConnectorMXBean

public class ServerConnectorAdmin
extends AbstractManagedObject
implements ServerConnectorMXBean

Implementation of the ClusterClient's administration mbean.


Constructor Summary
ServerConnectorAdmin(ServerConnector client)
           
 
Method Summary
 void enableSessionOnly()
          Enables connections to the target server.
 java.lang.String getAddress()
          Returns the server's IP address.
 ClusterMXBean getCluster()
          Returns the owning cluster's object name.
 int getClusterIndex()
          Returns the cluster index.
 int getConnectionActiveCount()
          Returns the number of connections actively being used to communicate with the target server.
 long getConnectionBusyCountTotal()
          Returns the number of connections which resulted in a busy response.
 long getConnectionFailCountTotal()
          Returns the number of connections which could not connect to the target server.
 int getConnectionIdleCount()
          Returns the number of open but currently unused connections to the target server.
 long getConnectionKeepaliveCountTotal()
          Returns the number of connections that have been made to the target server.
 long getConnectionNewCountTotal()
          Returns the number of connections that have been made to the target server.
 long getConnectTimeout()
          Returns the connect timeout for a client.
 long getIdleTime()
          Returns the maximum time a socket can remain idle in the pool.
 java.util.Date getLastBusyTime()
          Returns the last time of the busy response.
 java.util.Date getLastFailTime()
          Returns the time of the last failure.
 java.util.Date getLastSuccessTime()
           
 double getLatencyFactor()
          Returns the server's latency factory
 java.lang.String getName()
          Returns the -server id.
 int getPort()
          Returns the server's port.
 long getRecoverTime()
          Returns the time the client will consider the connection dead before retrying.
 double getServerCpuLoadAvg()
          Returns the server's load average.
 long getSocketTimeout()
          Returns the socket timeout for a client.
 java.lang.String getState()
          Returns the lifecycle state.
 java.lang.String getType()
          The JMX type of this MBean, defaults to the prefix of the FooMXBean..
 long getWarmupTime()
          Returns the warmup time in milliseconds.
 int getWeight()
          Returns the load-balance weight.
 boolean ping()
          Returns true if a connection can be made to the target server.
protected  void register()
           
 void start()
          Enables connections to the target server.
 void stop()
          Disables connections to the target server.
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.management.server.AbstractManagedObject
addObjectNameProperties, getObjectName, registerSelf, unregisterSelf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.caucho.management.server.ManagedObjectMXBean
getObjectName
 

Constructor Detail

ServerConnectorAdmin

public ServerConnectorAdmin(ServerConnector client)
Method Detail

getName

public java.lang.String getName()
Returns the -server id.

Specified by:
getName in interface ManagedObjectMXBean
Specified by:
getName in class AbstractManagedObject

getType

public java.lang.String getType()
Description copied from class: AbstractManagedObject
The JMX type of this MBean, defaults to the prefix of the FooMXBean..

Specified by:
getType in interface ManagedObjectMXBean
Overrides:
getType in class AbstractManagedObject

getCluster

public ClusterMXBean getCluster()
Returns the owning cluster's object name.

Specified by:
getCluster in interface ServerConnectorMXBean

getClusterIndex

public int getClusterIndex()
Returns the cluster index.

Specified by:
getClusterIndex in interface ServerConnectorMXBean

getAddress

public java.lang.String getAddress()
Returns the server's IP address.

Specified by:
getAddress in interface ServerConnectorMXBean

getPort

public int getPort()
Returns the server's port.

Specified by:
getPort in interface ServerConnectorMXBean

getRecoverTime

public long getRecoverTime()
Returns the time the client will consider the connection dead before retrying.

Specified by:
getRecoverTime in interface ServerConnectorMXBean

getIdleTime

public long getIdleTime()
Returns the maximum time a socket can remain idle in the pool.

Specified by:
getIdleTime in interface ServerConnectorMXBean

getConnectTimeout

public long getConnectTimeout()
Returns the connect timeout for a client.

Specified by:
getConnectTimeout in interface ServerConnectorMXBean

getSocketTimeout

public long getSocketTimeout()
Returns the socket timeout for a client.

Specified by:
getSocketTimeout in interface ServerConnectorMXBean

getWarmupTime

public long getWarmupTime()
Returns the warmup time in milliseconds.

Specified by:
getWarmupTime in interface ServerConnectorMXBean

getWeight

public int getWeight()
Returns the load-balance weight.

Specified by:
getWeight in interface ServerConnectorMXBean

getState

public java.lang.String getState()
Description copied from interface: ServerConnectorMXBean
Returns the lifecycle state.

Specified by:
getState in interface ServerConnectorMXBean

getConnectionActiveCount

public int getConnectionActiveCount()
Description copied from interface: ServerConnectorMXBean
Returns the number of connections actively being used to communicate with the target server.

Specified by:
getConnectionActiveCount in interface ServerConnectorMXBean

getConnectionIdleCount

public int getConnectionIdleCount()
Description copied from interface: ServerConnectorMXBean
Returns the number of open but currently unused connections to the target server.

Specified by:
getConnectionIdleCount in interface ServerConnectorMXBean

getConnectionNewCountTotal

public long getConnectionNewCountTotal()
Description copied from interface: ServerConnectorMXBean
Returns the number of connections that have been made to the target server.

Specified by:
getConnectionNewCountTotal in interface ServerConnectorMXBean

getConnectionFailCountTotal

public long getConnectionFailCountTotal()
Description copied from interface: ServerConnectorMXBean
Returns the number of connections which could not connect to the target server.

Specified by:
getConnectionFailCountTotal in interface ServerConnectorMXBean

getLastFailTime

public java.util.Date getLastFailTime()
Description copied from interface: ServerConnectorMXBean
Returns the time of the last failure.

Specified by:
getLastFailTime in interface ServerConnectorMXBean

getLastSuccessTime

public java.util.Date getLastSuccessTime()

getLatencyFactor

public double getLatencyFactor()
Description copied from interface: ServerConnectorMXBean
Returns the server's latency factory

Specified by:
getLatencyFactor in interface ServerConnectorMXBean

getConnectionBusyCountTotal

public long getConnectionBusyCountTotal()
Description copied from interface: ServerConnectorMXBean
Returns the number of connections which resulted in a busy response.

Specified by:
getConnectionBusyCountTotal in interface ServerConnectorMXBean

getLastBusyTime

public java.util.Date getLastBusyTime()
Description copied from interface: ServerConnectorMXBean
Returns the last time of the busy response.

Specified by:
getLastBusyTime in interface ServerConnectorMXBean

getConnectionKeepaliveCountTotal

public long getConnectionKeepaliveCountTotal()
Description copied from interface: ServerConnectorMXBean
Returns the number of connections that have been made to the target server.

Specified by:
getConnectionKeepaliveCountTotal in interface ServerConnectorMXBean

getServerCpuLoadAvg

public double getServerCpuLoadAvg()
Description copied from interface: ServerConnectorMXBean
Returns the server's load average.

Specified by:
getServerCpuLoadAvg in interface ServerConnectorMXBean

start

public void start()
Description copied from interface: ServerConnectorMXBean
Enables connections to the target server.

Specified by:
start in interface ServerConnectorMXBean

stop

public void stop()
Description copied from interface: ServerConnectorMXBean
Disables connections to the target server.

Specified by:
stop in interface ServerConnectorMXBean

enableSessionOnly

public void enableSessionOnly()
Description copied from interface: ServerConnectorMXBean
Enables connections to the target server.

Specified by:
enableSessionOnly in interface ServerConnectorMXBean

ping

public boolean ping()
Description copied from interface: ServerConnectorMXBean
Returns true if a connection can be made to the target server.

Specified by:
ping in interface ServerConnectorMXBean

register

protected void register()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object