cz.cuni.amis.pogamut.base.utils.logging.jmx
Class AgentLoggerJMXProxy

Package class diagram package AgentLoggerJMXProxy
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.utils.logging.AbstractAgentLogger
      extended by cz.cuni.amis.pogamut.base.utils.logging.jmx.AgentLoggerJMXProxy
All Implemented Interfaces:
IJMXEnabled, IAgentLogger, IJMXAgentLogger

public class AgentLoggerJMXProxy
extends AbstractAgentLogger

Makes remote AgentLogger look like local logger. The communication is handled through JMX interface.

IJMXAgentLogger interface is fully proxied (executes JMX remote calls).

Author:
ik

Field Summary
 
Fields inherited from class cz.cuni.amis.pogamut.base.utils.logging.AbstractAgentLogger
agentId, LOG_CATEGORY_NAME
 
Constructor Summary
AgentLoggerJMXProxy(IAgentId agentName, MBeanServerConnection mbsc, ObjectName parentName)
           
 
Method Summary
 void addDefaultNetworkHandler()
          Executes JMX remote call to the proxied IAgentLogger.addDefaultNetworkHandler() method.
 void enableJMX(MBeanServer mBeanServer, ObjectName parent)
          Method for starting the JMX extension of the class.
protected  ILogCategories getLogCategories()
           
 String getNetworkLoggerHost()
          Executes JMX remote call to the proxied IAgentLogger.getNetworkLoggerHost() method.
 Integer getNetworkLoggerPort()
          Executes JMX remote call to the proxied IAgentLogger.getNetworkLoggerPort() method.
 boolean isDefaultNetworkHandler()
          Executes JMX remote call to the proxied IAgentLogger.isDefaultNetworkHandler() method.
 void removeDefaultNetworkHandler()
          Executes JMX remote call to the proxied IAgentLogger.removeDefaultNetworkHandler() method.
 
Methods inherited from class cz.cuni.amis.pogamut.base.utils.logging.AbstractAgentLogger
addDefaultConsoleHandler, addDefaultFileHandler, addDefaultHandler, addDefaultPublisher, addToAllCategories, addToAllCategories, getAgentId, getCategories, getCategory, getCategory, getDefaultConsoleHandler, getDefaultNetworkHandler, isDefaultConsoleHandler, removeDefaultConsoleHandler, removeDefaultHandler, removeFromAllCategories, setLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentLoggerJMXProxy

public AgentLoggerJMXProxy(IAgentId agentName,
                           MBeanServerConnection mbsc,
                           ObjectName parentName)
Method Detail

getLogCategories

protected ILogCategories getLogCategories()
Specified by:
getLogCategories in class AbstractAgentLogger

enableJMX

public void enableJMX(MBeanServer mBeanServer,
                      ObjectName parent)
               throws JMXAlreadyEnabledException,
                      CantStartJMXException
Description copied from interface: IJMXEnabled
Method for starting the JMX extension of the class.

Object should register whatever objects it wants to expose via JMX.

Parameters:
mBeanServer - server where the MBean of agent is registered
parent - parent's ObjectName, should be used as base of name of the registered MBean
Throws:
JMXAlreadyEnabledException
CantStartJMXException

getNetworkLoggerHost

public String getNetworkLoggerHost()
Executes JMX remote call to the proxied IAgentLogger.getNetworkLoggerHost() method.

Specified by:
getNetworkLoggerHost in interface IAgentLogger
Specified by:
getNetworkLoggerHost in interface IJMXAgentLogger
Overrides:
getNetworkLoggerHost in class AbstractAgentLogger
Returns:
See Also:
IAgentLogger.getNetworkLoggerHost()

getNetworkLoggerPort

public Integer getNetworkLoggerPort()
Executes JMX remote call to the proxied IAgentLogger.getNetworkLoggerPort() method.

Specified by:
getNetworkLoggerPort in interface IAgentLogger
Specified by:
getNetworkLoggerPort in interface IJMXAgentLogger
Overrides:
getNetworkLoggerPort in class AbstractAgentLogger
Returns:
See Also:
IAgentLogger.getNetworkLoggerPort()

addDefaultNetworkHandler

public void addDefaultNetworkHandler()
Executes JMX remote call to the proxied IAgentLogger.addDefaultNetworkHandler() method.

Specified by:
addDefaultNetworkHandler in interface IAgentLogger
Specified by:
addDefaultNetworkHandler in interface IJMXAgentLogger
Overrides:
addDefaultNetworkHandler in class AbstractAgentLogger
See Also:
IAgentLogger.addDefaultNetworkHandler()

removeDefaultNetworkHandler

public void removeDefaultNetworkHandler()
Executes JMX remote call to the proxied IAgentLogger.removeDefaultNetworkHandler() method.

Specified by:
removeDefaultNetworkHandler in interface IAgentLogger
Specified by:
removeDefaultNetworkHandler in interface IJMXAgentLogger
Overrides:
removeDefaultNetworkHandler in class AbstractAgentLogger
See Also:
IAgentLogger.removeDefaultNetworkHandler()

isDefaultNetworkHandler

public boolean isDefaultNetworkHandler()
Executes JMX remote call to the proxied IAgentLogger.isDefaultNetworkHandler() method.

Specified by:
isDefaultNetworkHandler in interface IAgentLogger
Specified by:
isDefaultNetworkHandler in interface IJMXAgentLogger
Overrides:
isDefaultNetworkHandler in class AbstractAgentLogger
Returns:
See Also:
IAgentLogger.isDefaultNetworkHandler()


Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.