Package fr.dyade.aaa.agent
Class SCServer
- java.lang.Object
-
- fr.dyade.aaa.agent.SCServer
-
- All Implemented Interfaces:
SCServerMBean
public class SCServer extends Object implements SCServerMBean
JMX view of AgentServer.
-
-
Constructor Summary
Constructors Constructor Description SCServer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringbackup(String path)Backups the content of Transaction module.voidclearLoggerLevel(String classname)Sets the INHERIT level for the specified logger.voiddebug(String classname)Sets the DEBUG level for the specified logger.voiddumpAttributes(String name, String path, boolean threaddump)voiddumpServerState(String path)static voiddumpServerState(String path, String cause)voiderror(String classname)Sets the ERROR level for the specified logger.voidfatal(String classname)Sets the FATAL level for the specified logger.StringgetConfigurationProperty(String name)longgetHeapFreeMemory()Returns the amount of free memory in the JVM.longgetHeapMaxMemory()Returns the maximum amount of memory that can be used for memory management.longgetHeapTotalMemory()Returns the amount of memory that is guaranteed to be available for use by the JVM.longgetHeapUsedMemory()Return the amount of memory currently used in the JVM.StringgetName()shortgetServerId()String[]getServers()intgetStatus()StringgetStatusInfo()voidinfo(String classname)Sets the INFO level for the specified logger.voidsetLoggerLevel(String classname, String level)Set the given level for the specified logger.voidshutdown()voidstart()voidstop()voidwarn(String classname)Sets the WARN level for the specified logger.
-
-
-
Field Detail
-
logger
public static final Logger logger
-
-
Method Detail
-
getServerId
public short getServerId()
- Specified by:
getServerIdin interfaceSCServerMBean
-
getName
public String getName()
- Specified by:
getNamein interfaceSCServerMBean
-
start
public void start()
- Specified by:
startin interfaceSCServerMBean
-
stop
public void stop()
- Specified by:
stopin interfaceSCServerMBean
-
shutdown
public void shutdown()
- Specified by:
shutdownin interfaceSCServerMBean
-
getStatus
public int getStatus()
- Specified by:
getStatusin interfaceSCServerMBean
-
getStatusInfo
public String getStatusInfo()
- Specified by:
getStatusInfoin interfaceSCServerMBean
-
getServers
public String[] getServers()
- Specified by:
getServersin interfaceSCServerMBean
-
dumpServerState
public void dumpServerState(String path)
- Specified by:
dumpServerStatein interfaceSCServerMBean
-
dumpAttributes
public void dumpAttributes(String name, String path, boolean threaddump)
- Specified by:
dumpAttributesin interfaceSCServerMBean
-
getConfigurationProperty
public String getConfigurationProperty(String name)
- Specified by:
getConfigurationPropertyin interfaceSCServerMBean
-
getHeapMaxMemory
public long getHeapMaxMemory()
Description copied from interface:SCServerMBeanReturns the maximum amount of memory that can be used for memory management. Its value may be undefined. The maximum amount of memory may change over time if defined. The amount of used and committed memory will always be less than or equal to max if max is defined. A memory allocation may fail if it attempts to increase the used memory such that used > committed even if used <= max would still be true (for example, when the system is low on virtual memory).- Specified by:
getHeapMaxMemoryin interfaceSCServerMBean- Returns:
-
getHeapTotalMemory
public long getHeapTotalMemory()
Description copied from interface:SCServerMBeanReturns the amount of memory that is guaranteed to be available for use by the JVM. The amount of committed memory may change over time (increase or decrease). The Java virtual machine may release memory to the system and committed could be less than init. committed will always be greater than or equal to used.- Specified by:
getHeapTotalMemoryin interfaceSCServerMBean- Returns:
- the amount of memory (in bytes) that is guaranteed to be available for use by the JVM.
-
getHeapUsedMemory
public long getHeapUsedMemory()
Description copied from interface:SCServerMBeanReturn the amount of memory currently used in the JVM.- Specified by:
getHeapUsedMemoryin interfaceSCServerMBean- Returns:
- the amount of memory currently used in the JVM.
-
getHeapFreeMemory
public long getHeapFreeMemory()
Description copied from interface:SCServerMBeanReturns the amount of free memory in the JVM.- Specified by:
getHeapFreeMemoryin interfaceSCServerMBean- Returns:
- the amount of free memory in the JVM.
-
debug
public void debug(String classname)
Description copied from interface:SCServerMBeanSets the DEBUG level for the specified logger.- Specified by:
debugin interfaceSCServerMBean- Parameters:
classname- The logger name.
-
info
public void info(String classname)
Description copied from interface:SCServerMBeanSets the INFO level for the specified logger.- Specified by:
infoin interfaceSCServerMBean- Parameters:
classname- The logger name.
-
warn
public void warn(String classname)
Description copied from interface:SCServerMBeanSets the WARN level for the specified logger.- Specified by:
warnin interfaceSCServerMBean- Parameters:
classname- The logger name.
-
error
public void error(String classname)
Description copied from interface:SCServerMBeanSets the ERROR level for the specified logger.- Specified by:
errorin interfaceSCServerMBean- Parameters:
classname- The logger name.
-
fatal
public void fatal(String classname)
Description copied from interface:SCServerMBeanSets the FATAL level for the specified logger.- Specified by:
fatalin interfaceSCServerMBean- Parameters:
classname- The logger name.
-
setLoggerLevel
public void setLoggerLevel(String classname, String level)
Description copied from interface:SCServerMBeanSet the given level for the specified logger.- Specified by:
setLoggerLevelin interfaceSCServerMBean- Parameters:
classname- The logger name.level- The level name
-
clearLoggerLevel
public void clearLoggerLevel(String classname)
Description copied from interface:SCServerMBeanSets the INHERIT level for the specified logger.- Specified by:
clearLoggerLevelin interfaceSCServerMBean- Parameters:
classname- The logger name.
-
backup
public String backup(String path) throws Exception
Backups the content of Transaction module. Produces a generic Backup/Restore file containing all living objects.- Specified by:
backupin interfaceSCServerMBean- Parameters:
path- Directory path to store the backup.- Returns:
- the name of created backup file.
- Throws:
Exception- An error occurs during backup.
-
-