com.caucho.server.cluster
Class ServerAdmin

java.lang.Object
  extended by com.caucho.management.server.AbstractManagedObject
      extended by com.caucho.management.server.AbstractEmitterObject
          extended by com.caucho.server.cluster.ServerAdmin
All Implemented Interfaces:
ManagedObjectMXBean, ServerMXBean, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter
Direct Known Subclasses:
ProServerAdmin

public class ServerAdmin
extends AbstractEmitterObject
implements ServerMXBean


Method Summary
 TcpConnectionMXBean findConnectionByThreadId(long threadId)
          Finds the ConnectionMXBean for a given thread id
 java.util.ArrayList<CacheItem> getCacheStatistics()
          Returns the cache stuff.
 long getClientDisconnectCountTotal()
          The total number of connections that have terminated with ClientDisconnectException.
 ClusterMXBean getCluster()
          Returns the cluster owning this server
 PortMXBean getClusterPort()
          Returns the cluster port
 double getCpuLoadAvg()
          Returns the CPU load average.
 java.util.Date getCurrentTime()
          Returns the current time according to the server.
 EnvironmentMXBean getEnvironment()
          Returns the classloader EnvironmentMXBean
 java.lang.String getId()
          Returns the -server id.
 long getInvocationCacheHitCountTotal()
          Returns the invocation cache hit count.
 long getInvocationCacheMissCountTotal()
          Returns the invocation cache miss count.
 long getKeepaliveCountTotal()
          Returns the number of requests that have ended up in the keepalive state for this server in its lifetime.
 long getMemoryFreeMin()
          Returns the memory-free-min limit for forcing GC and restarting.
 java.lang.String getName()
          The JMX name property of the mbean.
 long getPermGenFreeMin()
          Returns the perm-gen-free-min limit for forcing GC and restarting.
 PortMXBean[] getPorts()
          Returns the array of ports.
 long getRequestCountTotal()
          Returns the total number of requests serviced by the server since it started.
 long getRequestReadBytesTotal()
          Returns the total number of bytes that requests serviced by this server have read.
 long getRequestTimeTotal()
          Returns the total duration in milliseconds that requests serviced by this server have taken.
 long getRequestWriteBytesTotal()
          Returns the total number of bytes that requests serviced by this server have written.
 long getRuntimeMemory()
          Returns the current total amount of memory available for the JVM, in bytes.
 long getRuntimeMemoryFree()
          Returns the current free amount of memory available for the JVM, in bytes.
 int getSelectKeepaliveCount()
          Returns the current number of connections that are in the keepalive state and are using select to maintain the connection.
 ClusterServerMXBean getSelfServer()
          Returns the cluster server owning this server
 java.lang.String getServerHeader()
          Returns the HTTP server header.
 int getServerIndex()
          Returns the server index in the cluster triad.
 long getShutdownWaitMax()
          The maximum time to spend waiting for the server to stop gracefully
 java.lang.String getStage()
          Returns the deployment repository stage.
 java.util.Date getStartTime()
          Returns the last start time.
 java.lang.String getState()
          The current lifecycle state.
 int getThreadActiveCount()
          Returns the current number of threads that are servicing requests.
 int getThreadKeepaliveCount()
          Returns the current number of connections that are in the keepalive state and are using a thread to maintain the connection.
 ThreadPoolMXBean getThreadPool()
          Returns the server's thread pool administration
 java.lang.String getType()
          The JMX type of this MBean, defaults to the prefix of the FooMXBean..
 long getUptime()
          Returns the time since the last start time.
 int getUrlLengthMax()
          Returns the HTTP URL maximum length
 boolean isBindPortsAfterStart()
          Returns true if ports are bound after startup.
 boolean isDetailedStatistics()
          Returns true if detailed statistics are being kept.
 boolean isDevelopmentModeErrorPage()
          True if detailed error pages are being generated.
 boolean isSelectManagerEnabled()
          Returns true if a AbstractSelectManager is enabled and active
 void restart()
          Restart this Resin server.
 
Methods inherited from class com.caucho.management.server.AbstractEmitterObject
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener
 
Methods inherited from class com.caucho.management.server.AbstractManagedObject
addObjectNameProperties, getObjectName, registerSelf, toString, 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
 

Method Detail

getName

public java.lang.String getName()
Description copied from class: AbstractManagedObject
The JMX name property of the mbean.

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

getId

public java.lang.String getId()
Description copied from interface: ServerMXBean
Returns the -server id.

Specified by:
getId in interface ServerMXBean

getServerIndex

public int getServerIndex()
Description copied from interface: ServerMXBean
Returns the server index in the cluster triad.

Specified by:
getServerIndex in interface ServerMXBean

getSelfServer

public ClusterServerMXBean getSelfServer()
Returns the cluster server owning this server

Specified by:
getSelfServer in interface ServerMXBean

getCluster

public ClusterMXBean getCluster()
Returns the cluster owning this server

Specified by:
getCluster in interface ServerMXBean

getEnvironment

public EnvironmentMXBean getEnvironment()
Description copied from interface: ServerMXBean
Returns the classloader EnvironmentMXBean

Specified by:
getEnvironment in interface ServerMXBean

getPorts

public PortMXBean[] getPorts()
Returns the array of ports.

Specified by:
getPorts in interface ServerMXBean

getThreadPool

public ThreadPoolMXBean getThreadPool()
Returns the server's thread pool administration

Specified by:
getThreadPool in interface ServerMXBean

getClusterPort

public PortMXBean getClusterPort()
Returns the cluster port

Specified by:
getClusterPort in interface ServerMXBean

isBindPortsAfterStart

public boolean isBindPortsAfterStart()
Description copied from interface: ServerMXBean
Returns true if ports are bound after startup.

Specified by:
isBindPortsAfterStart in interface ServerMXBean

isDetailedStatistics

public boolean isDetailedStatistics()
Returns true if detailed statistics are being kept.

Specified by:
isDetailedStatistics in interface ServerMXBean

isDevelopmentModeErrorPage

public boolean isDevelopmentModeErrorPage()
Description copied from interface: ServerMXBean
True if detailed error pages are being generated.

Specified by:
isDevelopmentModeErrorPage in interface ServerMXBean

getMemoryFreeMin

public long getMemoryFreeMin()
Description copied from interface: ServerMXBean
Returns the memory-free-min limit for forcing GC and restarting.

Specified by:
getMemoryFreeMin in interface ServerMXBean

getPermGenFreeMin

public long getPermGenFreeMin()
Description copied from interface: ServerMXBean
Returns the perm-gen-free-min limit for forcing GC and restarting.

Specified by:
getPermGenFreeMin in interface ServerMXBean

getServerHeader

public java.lang.String getServerHeader()
Description copied from interface: ServerMXBean
Returns the HTTP server header.

Specified by:
getServerHeader in interface ServerMXBean

isSelectManagerEnabled

public boolean isSelectManagerEnabled()
Description copied from interface: ServerMXBean
Returns true if a AbstractSelectManager is enabled and active

Specified by:
isSelectManagerEnabled in interface ServerMXBean

getShutdownWaitMax

public long getShutdownWaitMax()
Description copied from interface: ServerMXBean
The maximum time to spend waiting for the server to stop gracefully

Specified by:
getShutdownWaitMax in interface ServerMXBean

getStage

public java.lang.String getStage()
Description copied from interface: ServerMXBean
Returns the deployment repository stage.

Specified by:
getStage in interface ServerMXBean

getUrlLengthMax

public int getUrlLengthMax()
Description copied from interface: ServerMXBean
Returns the HTTP URL maximum length

Specified by:
getUrlLengthMax in interface ServerMXBean

getState

public java.lang.String getState()
The current lifecycle state.

Specified by:
getState in interface ServerMXBean

getCurrentTime

public java.util.Date getCurrentTime()
Returns the current time according to the server.

Specified by:
getCurrentTime in interface ServerMXBean

getStartTime

public java.util.Date getStartTime()
Returns the last start time.

Specified by:
getStartTime in interface ServerMXBean

getUptime

public long getUptime()
Returns the time since the last start time.

Specified by:
getUptime in interface ServerMXBean

getThreadActiveCount

public int getThreadActiveCount()
Returns the current number of threads that are servicing requests.

Specified by:
getThreadActiveCount in interface ServerMXBean

getThreadKeepaliveCount

public int getThreadKeepaliveCount()
Returns the current number of connections that are in the keepalive state and are using a thread to maintain the connection.

Specified by:
getThreadKeepaliveCount in interface ServerMXBean

getSelectKeepaliveCount

public int getSelectKeepaliveCount()
Returns the current number of connections that are in the keepalive state and are using select to maintain the connection.

Specified by:
getSelectKeepaliveCount in interface ServerMXBean

getRequestCountTotal

public long getRequestCountTotal()
Returns the total number of requests serviced by the server since it started.

Specified by:
getRequestCountTotal in interface ServerMXBean

getKeepaliveCountTotal

public long getKeepaliveCountTotal()
Returns the number of requests that have ended up in the keepalive state for this server in its lifetime.

Specified by:
getKeepaliveCountTotal in interface ServerMXBean

getClientDisconnectCountTotal

public long getClientDisconnectCountTotal()
The total number of connections that have terminated with ClientDisconnectException.

Specified by:
getClientDisconnectCountTotal in interface ServerMXBean

getRequestTimeTotal

public long getRequestTimeTotal()
Returns the total duration in milliseconds that requests serviced by this server have taken.

Specified by:
getRequestTimeTotal in interface ServerMXBean

getRequestReadBytesTotal

public long getRequestReadBytesTotal()
Returns the total number of bytes that requests serviced by this server have read.

Specified by:
getRequestReadBytesTotal in interface ServerMXBean

getRequestWriteBytesTotal

public long getRequestWriteBytesTotal()
Returns the total number of bytes that requests serviced by this server have written.

Specified by:
getRequestWriteBytesTotal in interface ServerMXBean

getInvocationCacheHitCountTotal

public long getInvocationCacheHitCountTotal()
Returns the invocation cache hit count.

Specified by:
getInvocationCacheHitCountTotal in interface ServerMXBean

getInvocationCacheMissCountTotal

public long getInvocationCacheMissCountTotal()
Returns the invocation cache miss count.

Specified by:
getInvocationCacheMissCountTotal in interface ServerMXBean

getRuntimeMemory

public long getRuntimeMemory()
Returns the current total amount of memory available for the JVM, in bytes.

Specified by:
getRuntimeMemory in interface ServerMXBean

getRuntimeMemoryFree

public long getRuntimeMemoryFree()
Returns the current free amount of memory available for the JVM, in bytes.

Specified by:
getRuntimeMemoryFree in interface ServerMXBean

getCpuLoadAvg

public double getCpuLoadAvg()
Returns the CPU load average.

Specified by:
getCpuLoadAvg in interface ServerMXBean

getCacheStatistics

public java.util.ArrayList<CacheItem> getCacheStatistics()
Returns the cache stuff.


restart

public void restart()
Restart this Resin server.

Specified by:
restart in interface ServerMXBean

findConnectionByThreadId

public TcpConnectionMXBean findConnectionByThreadId(long threadId)
Finds the ConnectionMXBean for a given thread id

Specified by:
findConnectionByThreadId in interface ServerMXBean