|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.management.remote.message.MBeanServerRequestMessage
public class MBeanServerRequestMessage
An MBeanServerConnection
method call, encoded as an
object. Objects of this type are sent from the client end to the
server end of a JMX API connection. The result of the method is sent
as an MBeanServerResponseMessage
.
Instances of this class are immutable.
The method to be called is specified by an integer constant;
these constants are defined in this class. Overloaded methods such
as createMBean
define a different constant for each
overloaded version.
The parameters to the method are provided as an Object[]
when the MBeanServerRequestMessage
is constructed. Except
where specified, the number and type of these parameters are the same as
for the MBeanServerConnection
method to be called. Similarly,
except where specified, the type of the value returned in the corresponding
MBeanServerResponseMessage
is the return type of the
method to be called, or null if this type is void
.
Because an MBean can use a class loader other than the default
one, some parameters need to be wrapped before being encoded in an
MBeanServerRequestMessage
. See ObjectWrapping
and the JMX Remote API specification.
Subject delegation might be used by supplying the appropriate delegation
subject on each request. The delegation subject is the subject on which the
authorization checks are performed for this request. If null
the
authorization checks are performed on the authentication subject instead.
Constructor Summary | |
---|---|
MBeanServerRequestMessage(int methodId,
Object[] params,
Subject delegationSubject)
Constructs a message to invoke the method with the given identifier and parameters. |
Method Summary | |
---|---|
Subject |
getDelegationSubject()
Returns the delegation subject. |
long |
getMessageId()
Returns this message's unique identifier. |
int |
getMethodId()
Returns the method identifier of this message. |
Object[] |
getParams()
Returns the method parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ADD_NOTIFICATION_LISTENERS
Identifier for the method MBeanServerConnection.addNotificationListener(ObjectName,
NotificationListener, NotificationFilter, Object)
. This
message allows several listeners to be added at the same
time.
The meaning of this message is : register for notifications
from the given MBeans that match the given filters. The remote
client can subsequently retrieve the notifications using NotificationRequestMessage
.
For each listener, the original
NotificationListener
and handback
are
kept on the client side; in order for the client to be able to
identify them, the server generates and returns a unique
listenerID
. This listenerID
is
forwarded with the Notifications
to the remote
client.
The parameters contained in the
MBeanServerRequestMessage
for this method are an
array of ObjectName
and an array of
Object
. Both arrays have the same size. Each
element of the array of Object
contains null or a
NotificationFilter
object wrapped using ObjectWrapping
.
The corresponding MBeanServerResponseMessage
will
contain an Integer[]
that identifies the listeners
that were registered. Subsequent notifications sent from
server to client will include this identifier to indicate which
listener is to receive the notification.
public static final int ADD_NOTIFICATION_LISTENER_OBJECTNAME
Identifier for the method
MBeanServerConnection.addNotificationListener(ObjectName,
ObjectName, NotificationFilter, Object)
.
The parameters contained in the MBeanServerRequestMessage
for this method are the four parameters to the method. The
NotificationFilter
and Object
parameters are
wrapped using ObjectWrapping
.
public static final int CREATE_MBEAN
Identifier for the method
MBeanServerConnection.createMBean(String, ObjectName)
.
public static final int CREATE_MBEAN_PARAMS
Identifier for the method
MBeanServerConnection.createMBean(String, ObjectName, Object[],
String[])
.
The Object[]
parameter is wrapped using
ObjectWrapping
.
public static final int CREATE_MBEAN_LOADER
Identifier for the method
MBeanServerConnection.createMBean(String, ObjectName,
ObjectName)
.
public static final int CREATE_MBEAN_LOADER_PARAMS
Identifier for the method
MBeanServerConnection.createMBean(String, ObjectName, ObjectName,
Object[], String[])
.
The Object[]
parameter is wrapped using
ObjectWrapping
.
public static final int GET_ATTRIBUTE
Identifier for the method
MBeanServerConnection.getAttribute(ObjectName, String)
.
public static final int GET_ATTRIBUTES
Identifier for the method
MBeanServerConnection.getAttributes(ObjectName, String[])
.
public static final int GET_DEFAULT_DOMAIN
Identifier for the method
MBeanServerConnection.getDefaultDomain()
.
public static final int GET_DOMAINS
Identifier for the method
MBeanServerConnection.getDomains()
.
public static final int GET_MBEAN_COUNT
Identifier for the method
MBeanServerConnection.getMBeanCount()
.
public static final int GET_MBEAN_INFO
Identifier for the method
MBeanServerConnection.getMBeanInfo(ObjectName)
.
public static final int GET_OBJECT_INSTANCE
Identifier for the method
MBeanServerConnection.getObjectInstance(ObjectName)
.
public static final int INVOKE
Identifier for the method
MBeanServerConnection.invoke(ObjectName, String, Object[],
String[])
.
The Object[]
parameter is wrapped using
ObjectWrapping
.
public static final int IS_INSTANCE_OF
Identifier for the method
MBeanServerConnection.isInstanceOf(ObjectName, String)
.
A successful MBeanServerResponseMessage
response will contain
a return value of type Boolean
.
public static final int IS_REGISTERED
Identifier for the method
MBeanServerConnection.isRegistered(ObjectName)
.
A successful MBeanServerResponseMessage
response will contain
a return value of type Boolean
.
public static final int QUERY_MBEANS
Identifier for the method
MBeanServerConnection.queryMBeans(ObjectName, QueryExp)
.
public static final int QUERY_NAMES
Identifier for the method
MBeanServerConnection.queryNames(ObjectName, QueryExp)
.
public static final int REMOVE_NOTIFICATION_LISTENER
Identifier for the method
MBeanServerConnection.removeNotificationListener(ObjectName,
NotificationListener)
.
The parameters contained in the MBeanServerRequestMessage
for this method are the ObjectName
and an
Integer[]
.
The Integer[]
contains the identifiers that
the server returned for every ADD_NOTIFICATION_LISTENERS
message on this connection that specified the given
ObjectName
and NotificationListener
and that
was not cancelled by a subsequent REMOVE_NOTIFICATION_LISTENER
or REMOVE_NOTIFICATION_LISTENER_FILTER_HANDBACK
message.
public static final int REMOVE_NOTIFICATION_LISTENER_FILTER_HANDBACK
Identifier for the method
MBeanServerConnection.removeNotificationListener(ObjectName,
NotificationListener, NotificationFilter, Object)
.
The parameters contained in the MBeanServerRequestMessage
for this method are the ObjectName
and an
Integer
.
The Integer
contains the identifier that the server
returned for the ADD_NOTIFICATION_LISTENERS
message on this
connection that specified the given ObjectName
,
NotificationListener
, NotificationFilter
,
and Object
handback.
public static final int REMOVE_NOTIFICATION_LISTENER_OBJECTNAME
Identifier for the method
MBeanServerConnection.removeNotificationListener(ObjectName,
ObjectName)
.
The parameters contained in the MBeanServerRequestMessage
for this method are the two ObjectName
parameters.
public static final int REMOVE_NOTIFICATION_LISTENER_OBJECTNAME_FILTER_HANDBACK
Identifier for the method
MBeanServerConnection.removeNotificationListener(ObjectName,
ObjectName, NotificationFilter, Object)
.
The parameters contained in the MBeanServerRequestMessage
for this method are the four parameters to the method. The
NotificationFilter
and Object
parameters are
wrapped using ObjectWrapping
.
public static final int SET_ATTRIBUTE
Identifier for the method
MBeanServerConnection.setAttribute(ObjectName, Attribute)
.
The Attribute
parameter is wrapped using
ObjectWrapping
.
public static final int SET_ATTRIBUTES
Identifier for the method
MBeanServerConnection.setAttributes(ObjectName,
AttributeList)
.
The AttributeList
is wrapped using
ObjectWrapping
.
public static final int UNREGISTER_MBEAN
Identifier for the method
MBeanServerConnection.unregisterMBean(ObjectName)
.
Constructor Detail |
---|
public MBeanServerRequestMessage(int methodId, Object[] params, Subject delegationSubject)
Constructs a message to invoke the method with the given
identifier and parameters. Each constructed object gets a
unique message ID, as returned by getMessageId()
.
methodId
- the identifier of an MBeanServerConnection
method. This should be one of the integer constants defined in this
class. The behavior is not specified if it is not.params
- parameters to the method. The number and types
of the parameters depend on the method, as specified by the
definition of the corresponding integer constant in this class.delegationSubject
- the subject on which the authorization checks
are performed for this request. If null
the authorization
checks are performed on the authentication subject instead.Method Detail |
---|
public int getMethodId()
Returns the method identifier of this message.
MBeanServerConnection
method that this
MBeanServerRequestMessage
corresponds to. This
will be one of the integer constants defined in this class.public Object[] getParams()
Returns the method parameters.
public Subject getDelegationSubject()
Returns the delegation subject.
public long getMessageId()
Returns this message's unique identifier. Every instance of this class has a different identifier.
|
Open Source build 02 opendmk-1.0-b02 2007.10.01_19:17:46_MEST |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |