mx4j.tools.remote.http
Class HTTPService
java.lang.Object
mx4j.tools.remote.http.HTTPService
- All Implemented Interfaces:
- HTTPConnection, JMXConnection
- Direct Known Subclasses:
- CauchoService, SOAPService
- public abstract class HTTPService
- extends java.lang.Object
- implements HTTPConnection
- Version:
- $Revision: 1.4 $
Method Summary |
protected void |
addConnection(Connection connection)
|
void |
addNotificationListener(javax.management.ObjectName name,
javax.management.ObjectName listener,
java.lang.Object filter,
java.lang.Object handback,
javax.security.auth.Subject delegate)
|
java.lang.Integer |
addNotificationListener(javax.management.ObjectName name,
java.lang.Object filter,
javax.security.auth.Subject delegate)
|
void |
close()
|
java.lang.String |
connect(java.lang.Object credentials)
This method is called when a call initiated by JMXConnector.connect()
arrives on server side. |
javax.management.ObjectInstance |
createMBean(java.lang.String className,
javax.management.ObjectName name,
javax.management.ObjectName loaderName,
java.lang.Object params,
java.lang.String[] signature,
javax.security.auth.Subject delegate)
|
javax.management.ObjectInstance |
createMBean(java.lang.String className,
javax.management.ObjectName name,
java.lang.Object params,
java.lang.String[] signature,
javax.security.auth.Subject delegate)
|
javax.management.remote.NotificationResult |
fetchNotifications(long clientSequenceNumber,
int maxNotifications,
long timeout)
|
protected Connection |
findConnection()
|
protected abstract java.lang.String |
findConnectionId()
|
protected javax.management.remote.JMXServiceURL |
findJMXServiceURL()
|
protected abstract java.lang.String |
findRequestURL()
|
java.lang.Object |
getAttribute(javax.management.ObjectName name,
java.lang.String attribute,
javax.security.auth.Subject delegate)
|
javax.management.AttributeList |
getAttributes(javax.management.ObjectName name,
java.lang.String[] attributes,
javax.security.auth.Subject delegate)
|
java.lang.String |
getConnectionId()
|
java.lang.String |
getDefaultDomain(javax.security.auth.Subject delegate)
|
java.lang.String[] |
getDomains(javax.security.auth.Subject delegate)
|
protected Logger |
getLogger()
|
java.lang.Integer |
getMBeanCount(javax.security.auth.Subject delegate)
|
javax.management.MBeanInfo |
getMBeanInfo(javax.management.ObjectName name,
javax.security.auth.Subject delegate)
|
javax.management.ObjectInstance |
getObjectInstance(javax.management.ObjectName name,
javax.security.auth.Subject delegate)
|
protected abstract java.lang.String |
getProtocol()
|
java.lang.Object |
invoke(javax.management.ObjectName name,
java.lang.String operationName,
java.lang.Object params,
java.lang.String[] signature,
javax.security.auth.Subject delegate)
|
boolean |
isInstanceOf(javax.management.ObjectName name,
java.lang.String className,
javax.security.auth.Subject delegate)
|
boolean |
isRegistered(javax.management.ObjectName name,
javax.security.auth.Subject delegate)
|
java.util.Set |
queryMBeans(javax.management.ObjectName name,
java.lang.Object query,
javax.security.auth.Subject delegate)
|
java.util.Set |
queryNames(javax.management.ObjectName name,
java.lang.Object query,
javax.security.auth.Subject delegate)
|
protected void |
removeConnection(Connection connection)
|
void |
removeNotificationListener(javax.management.ObjectName name,
javax.management.ObjectName listener,
java.lang.Object filter,
java.lang.Object handback,
javax.security.auth.Subject delegate)
|
void |
removeNotificationListener(javax.management.ObjectName name,
javax.management.ObjectName listener,
javax.security.auth.Subject delegate)
|
void |
removeNotificationListeners(javax.management.ObjectName name,
java.lang.Integer[] listenerIDs,
javax.security.auth.Subject delegate)
|
void |
setAttribute(javax.management.ObjectName name,
java.lang.Object attribute,
javax.security.auth.Subject delegate)
|
javax.management.AttributeList |
setAttributes(javax.management.ObjectName name,
java.lang.Object attributes,
javax.security.auth.Subject delegate)
|
void |
unregisterMBean(javax.management.ObjectName name,
javax.security.auth.Subject delegate)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HTTPService
public HTTPService()
getLogger
protected Logger getLogger()
connect
public java.lang.String connect(java.lang.Object credentials)
throws java.io.IOException,
java.lang.SecurityException
- Description copied from interface:
HTTPConnection
- This method is called when a call initiated by
JMXConnector.connect()
arrives on server side. For HTTP connections, the socket is handled by the web container, but
the remote procedure call that arrives along with the HTTP request is parsed and then (normally)
forwarded to a JavaBean (that will implement this interface).
Implementations of this method will normally call ConnectionManager.connect(java.lang.Object)
.
- Specified by:
connect
in interface HTTPConnection
- Parameters:
credentials
- The credential for authentication
- Returns:
- The connection id for the newly created connection
- Throws:
java.io.IOException
- If a communication problem occurs
java.lang.SecurityException
- If the authentication fails
findJMXServiceURL
protected javax.management.remote.JMXServiceURL findJMXServiceURL()
throws java.net.MalformedURLException
- Throws:
java.net.MalformedURLException
findRequestURL
protected abstract java.lang.String findRequestURL()
getProtocol
protected abstract java.lang.String getProtocol()
addConnection
protected void addConnection(Connection connection)
throws java.io.IOException
- Throws:
java.io.IOException
removeConnection
protected void removeConnection(Connection connection)
throws java.io.IOException
- Throws:
java.io.IOException
findConnection
protected Connection findConnection()
throws java.io.IOException
- Throws:
java.io.IOException
findConnectionId
protected abstract java.lang.String findConnectionId()
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface JMXConnection
- Throws:
java.io.IOException
getConnectionId
public java.lang.String getConnectionId()
throws java.io.IOException
- Throws:
java.io.IOException
createMBean
public javax.management.ObjectInstance createMBean(java.lang.String className,
javax.management.ObjectName name,
java.lang.Object params,
java.lang.String[] signature,
javax.security.auth.Subject delegate)
throws javax.management.ReflectionException,
javax.management.InstanceAlreadyExistsException,
javax.management.MBeanRegistrationException,
javax.management.MBeanException,
javax.management.NotCompliantMBeanException,
java.io.IOException
- Specified by:
createMBean
in interface JMXConnection
- Throws:
javax.management.ReflectionException
javax.management.InstanceAlreadyExistsException
javax.management.MBeanRegistrationException
javax.management.MBeanException
javax.management.NotCompliantMBeanException
java.io.IOException
createMBean
public javax.management.ObjectInstance createMBean(java.lang.String className,
javax.management.ObjectName name,
javax.management.ObjectName loaderName,
java.lang.Object params,
java.lang.String[] signature,
javax.security.auth.Subject delegate)
throws javax.management.ReflectionException,
javax.management.InstanceAlreadyExistsException,
javax.management.MBeanRegistrationException,
javax.management.MBeanException,
javax.management.NotCompliantMBeanException,
javax.management.InstanceNotFoundException,
java.io.IOException
- Specified by:
createMBean
in interface JMXConnection
- Throws:
javax.management.ReflectionException
javax.management.InstanceAlreadyExistsException
javax.management.MBeanRegistrationException
javax.management.MBeanException
javax.management.NotCompliantMBeanException
javax.management.InstanceNotFoundException
java.io.IOException
unregisterMBean
public void unregisterMBean(javax.management.ObjectName name,
javax.security.auth.Subject delegate)
throws javax.management.InstanceNotFoundException,
javax.management.MBeanRegistrationException,
java.io.IOException
- Specified by:
unregisterMBean
in interface JMXConnection
- Throws:
javax.management.InstanceNotFoundException
javax.management.MBeanRegistrationException
java.io.IOException
getObjectInstance
public javax.management.ObjectInstance getObjectInstance(javax.management.ObjectName name,
javax.security.auth.Subject delegate)
throws javax.management.InstanceNotFoundException,
java.io.IOException
- Specified by:
getObjectInstance
in interface JMXConnection
- Throws:
javax.management.InstanceNotFoundException
java.io.IOException
queryMBeans
public java.util.Set queryMBeans(javax.management.ObjectName name,
java.lang.Object query,
javax.security.auth.Subject delegate)
throws java.io.IOException
- Specified by:
queryMBeans
in interface JMXConnection
- Throws:
java.io.IOException
queryNames
public java.util.Set queryNames(javax.management.ObjectName name,
java.lang.Object query,
javax.security.auth.Subject delegate)
throws java.io.IOException
- Specified by:
queryNames
in interface JMXConnection
- Throws:
java.io.IOException
isRegistered
public boolean isRegistered(javax.management.ObjectName name,
javax.security.auth.Subject delegate)
throws java.io.IOException
- Specified by:
isRegistered
in interface JMXConnection
- Throws:
java.io.IOException
getMBeanCount
public java.lang.Integer getMBeanCount(javax.security.auth.Subject delegate)
throws java.io.IOException
- Specified by:
getMBeanCount
in interface JMXConnection
- Throws:
java.io.IOException
getAttribute
public java.lang.Object getAttribute(javax.management.ObjectName name,
java.lang.String attribute,
javax.security.auth.Subject delegate)
throws javax.management.MBeanException,
javax.management.AttributeNotFoundException,
javax.management.InstanceNotFoundException,
javax.management.ReflectionException,
java.io.IOException
- Specified by:
getAttribute
in interface JMXConnection
- Throws:
javax.management.MBeanException
javax.management.AttributeNotFoundException
javax.management.InstanceNotFoundException
javax.management.ReflectionException
java.io.IOException
getAttributes
public javax.management.AttributeList getAttributes(javax.management.ObjectName name,
java.lang.String[] attributes,
javax.security.auth.Subject delegate)
throws javax.management.InstanceNotFoundException,
javax.management.ReflectionException,
java.io.IOException
- Specified by:
getAttributes
in interface JMXConnection
- Throws:
javax.management.InstanceNotFoundException
javax.management.ReflectionException
java.io.IOException
setAttribute
public void setAttribute(javax.management.ObjectName name,
java.lang.Object attribute,
javax.security.auth.Subject delegate)
throws javax.management.InstanceNotFoundException,
javax.management.AttributeNotFoundException,
javax.management.InvalidAttributeValueException,
javax.management.MBeanException,
javax.management.ReflectionException,
java.io.IOException
- Specified by:
setAttribute
in interface JMXConnection
- Throws:
javax.management.InstanceNotFoundException
javax.management.AttributeNotFoundException
javax.management.InvalidAttributeValueException
javax.management.MBeanException
javax.management.ReflectionException
java.io.IOException
setAttributes
public javax.management.AttributeList setAttributes(javax.management.ObjectName name,
java.lang.Object attributes,
javax.security.auth.Subject delegate)
throws javax.management.InstanceNotFoundException,
javax.management.ReflectionException,
java.io.IOException
- Specified by:
setAttributes
in interface JMXConnection
- Throws:
javax.management.InstanceNotFoundException
javax.management.ReflectionException
java.io.IOException
invoke
public java.lang.Object invoke(javax.management.ObjectName name,
java.lang.String operationName,
java.lang.Object params,
java.lang.String[] signature,
javax.security.auth.Subject delegate)
throws javax.management.InstanceNotFoundException,
javax.management.MBeanException,
javax.management.ReflectionException,
java.io.IOException
- Specified by:
invoke
in interface JMXConnection
- Throws:
javax.management.InstanceNotFoundException
javax.management.MBeanException
javax.management.ReflectionException
java.io.IOException
getDefaultDomain
public java.lang.String getDefaultDomain(javax.security.auth.Subject delegate)
throws java.io.IOException
- Specified by:
getDefaultDomain
in interface JMXConnection
- Throws:
java.io.IOException
getDomains
public java.lang.String[] getDomains(javax.security.auth.Subject delegate)
throws java.io.IOException
- Specified by:
getDomains
in interface JMXConnection
- Throws:
java.io.IOException
getMBeanInfo
public javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName name,
javax.security.auth.Subject delegate)
throws javax.management.InstanceNotFoundException,
javax.management.IntrospectionException,
javax.management.ReflectionException,
java.io.IOException
- Specified by:
getMBeanInfo
in interface JMXConnection
- Throws:
javax.management.InstanceNotFoundException
javax.management.IntrospectionException
javax.management.ReflectionException
java.io.IOException
isInstanceOf
public boolean isInstanceOf(javax.management.ObjectName name,
java.lang.String className,
javax.security.auth.Subject delegate)
throws javax.management.InstanceNotFoundException,
java.io.IOException
- Specified by:
isInstanceOf
in interface JMXConnection
- Throws:
javax.management.InstanceNotFoundException
java.io.IOException
addNotificationListener
public void addNotificationListener(javax.management.ObjectName name,
javax.management.ObjectName listener,
java.lang.Object filter,
java.lang.Object handback,
javax.security.auth.Subject delegate)
throws javax.management.InstanceNotFoundException,
java.io.IOException
- Specified by:
addNotificationListener
in interface JMXConnection
- Throws:
javax.management.InstanceNotFoundException
java.io.IOException
removeNotificationListener
public void removeNotificationListener(javax.management.ObjectName name,
javax.management.ObjectName listener,
javax.security.auth.Subject delegate)
throws javax.management.InstanceNotFoundException,
javax.management.ListenerNotFoundException,
java.io.IOException
- Specified by:
removeNotificationListener
in interface JMXConnection
- Throws:
javax.management.InstanceNotFoundException
javax.management.ListenerNotFoundException
java.io.IOException
removeNotificationListener
public void removeNotificationListener(javax.management.ObjectName name,
javax.management.ObjectName listener,
java.lang.Object filter,
java.lang.Object handback,
javax.security.auth.Subject delegate)
throws javax.management.InstanceNotFoundException,
javax.management.ListenerNotFoundException,
java.io.IOException
- Specified by:
removeNotificationListener
in interface JMXConnection
- Throws:
javax.management.InstanceNotFoundException
javax.management.ListenerNotFoundException
java.io.IOException
addNotificationListener
public java.lang.Integer addNotificationListener(javax.management.ObjectName name,
java.lang.Object filter,
javax.security.auth.Subject delegate)
throws javax.management.InstanceNotFoundException,
java.io.IOException
- Specified by:
addNotificationListener
in interface HTTPConnection
- Throws:
javax.management.InstanceNotFoundException
java.io.IOException
removeNotificationListeners
public void removeNotificationListeners(javax.management.ObjectName name,
java.lang.Integer[] listenerIDs,
javax.security.auth.Subject delegate)
throws javax.management.InstanceNotFoundException,
javax.management.ListenerNotFoundException,
java.io.IOException
- Specified by:
removeNotificationListeners
in interface HTTPConnection
- Throws:
javax.management.InstanceNotFoundException
javax.management.ListenerNotFoundException
java.io.IOException
fetchNotifications
public javax.management.remote.NotificationResult fetchNotifications(long clientSequenceNumber,
int maxNotifications,
long timeout)
throws java.io.IOException
- Specified by:
fetchNotifications
in interface HTTPConnection
- Throws:
java.io.IOException
Copyright © 2001-2005 The MX4J Contributors. All Rights Reserved.