org.opensolaris.opengrok.management.client
Class AgentConnection
java.lang.Object
org.opensolaris.opengrok.management.client.AgentConnection
- All Implemented Interfaces:
- java.util.EventListener, javax.management.NotificationListener
public class AgentConnection
- extends java.lang.Object
- implements javax.management.NotificationListener
Class to handle the connection and methods to the OpenGrok Agent
Constructor Summary |
AgentConnection(java.lang.String url)
Constructor for AgentConnection to OpenGrok JMX Agent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JAVA_LANG_STRING
public static final java.lang.String JAVA_LANG_STRING
- See Also:
- Constant Field Values
JAVA_LANG_OBJECT
public static final java.lang.String JAVA_LANG_OBJECT
- See Also:
- Constant Field Values
AgentConnection
public AgentConnection(java.lang.String url)
throws java.net.MalformedURLException,
java.io.IOException,
javax.management.MalformedObjectNameException
- Constructor for AgentConnection to OpenGrok JMX Agent
- Parameters:
url
- The url for the agent to connect to (format host:port)
- Throws:
java.net.MalformedURLException
- if url is not in correct format
java.io.IOException
- if a connection error occurs
javax.management.MalformedObjectNameException
- if the JMX object name is not correct
getMBeanServerConnection
public javax.management.MBeanServerConnection getMBeanServerConnection()
getAgentURL
public java.lang.String getAgentURL()
setActionListener
public void setActionListener(java.awt.event.ActionListener listener)
getFilesInfo
public java.lang.String getFilesInfo()
clearFilesInfo
public void clearFilesInfo()
getStartTime
public long getStartTime()
getEndTime
public long getEndTime()
handleNotification
public void handleNotification(javax.management.Notification notification,
java.lang.Object handback)
- Specified by:
handleNotification
in interface javax.management.NotificationListener
registerListener
public void registerListener()
throws java.io.IOException,
javax.management.InstanceNotFoundException
- Throws:
java.io.IOException
javax.management.InstanceNotFoundException
reconnect
public void reconnect(int retrytimes)
throws java.net.MalformedURLException,
java.io.IOException
- Throws:
java.net.MalformedURLException
java.io.IOException
connect
protected void connect()
throws java.net.MalformedURLException,
java.io.IOException
- Throws:
java.net.MalformedURLException
java.io.IOException
isConnected
public boolean isConnected()
unregister
public void unregister()