Oracle

weblogic.security.service
Class JMXResource

java.lang.Object
  extended by weblogic.security.service.ResourceBase
      extended by weblogic.security.service.JMXResource
All Implemented Interfaces:
Serializable, Resource, SelfDescribingResource, SelfDescribingResourceV2

public final class JMXResource
extends ResourceBase

The JMXResource class is used by a container to specify the JMX MBean resource (and method related to the resource) that a caller is attempting to access.

The toString format (which is produced by the ResourceBase class) for a JMXResource resource is:
type=<jmx>, operation=get, application=, mbeanType=weblogic.management.configuration.Server, target=ListenPort

The toString format for a bean contained within a JMS system resource is:
type=<jmx>, operation=get, application=mySystemResource, mbeanType=weblogic.j2ee.descriptor.wl.LoadBalancingParamsBean, target=ServerAffinityEnabled

See Also:
Serialized Form

Field Summary
static String CREATE
           
static String FIND
           
static String GET
          The operations supported by JMXResource.
static String GET_ENCRYPTED
           
static String INVOKE
           
static String SET
           
static String SET_ENCRYPTED
           
static String UNREGISTER
           
 
Fields inherited from class weblogic.security.service.ResourceBase
id, length, NO_PARENT, parent, resStr, SCOPE_RESOURCE_ACTION, values
 
Fields inherited from interface weblogic.security.spi.SelfDescribingResource
LIST_FIELD_TYPE, NORMAL_FIELD_TYPE, PATH_FIELD_TYPE, UNDEFINED_FIELD_TYPE
 
Constructor Summary
JMXResource(String operation, String application, String beanType, String target)
          Constructs a new JMXResource with a target name composed from the operation, app, mbeanType, and target parameters.
 
Method Summary
 String[] getKeys()
          Gets keys for this resource.
 String getType()
          Gets the type of this resource (JMXResource).
protected  Resource makeParent()
          Gets a Resource object that represents the parent of the current JMXResource.
 
Methods inherited from class weblogic.security.service.ResourceBase
appendArrayValue, appendValue, equals, getFieldType, getID, getParentResource, getRepeatingFieldIndex, getRepeatingFieldTerminatingIndex, getValues, hashCode, init, init, isTransitiveField, reset, toString, writeResourceString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

GET

public static final String GET
The operations supported by JMXResource. These map to the JMX methods for getAttribute (get, getEncrypted), setAttribute (set, setEncrypted), invoke (find, invoke), createMBean (create), and unregisterMBean(unregister).

See Also:
Constant Field Values

GET_ENCRYPTED

public static final String GET_ENCRYPTED
See Also:
Constant Field Values

SET

public static final String SET
See Also:
Constant Field Values

SET_ENCRYPTED

public static final String SET_ENCRYPTED
See Also:
Constant Field Values

FIND

public static final String FIND
See Also:
Constant Field Values

INVOKE

public static final String INVOKE
See Also:
Constant Field Values

CREATE

public static final String CREATE
See Also:
Constant Field Values

UNREGISTER

public static final String UNREGISTER
See Also:
Constant Field Values
Constructor Detail

JMXResource

public JMXResource(String operation,
                   String application,
                   String beanType,
                   String target)
Constructs a new JMXResource with a target name composed from the operation, app, mbeanType, and target parameters.

Parameters:
operation - a String representing the name of the operation being requested on the resource. A value of null indicates that the security policy for the resource pertains to all operations. Valid values for this parameter are restricted to the following:
  • get
  • getEncrypted
  • set
  • setEncrypted
  • find
  • invoke
  • create
  • unregister

application - a String indicating the name of the application in which the resource is deployed, or the name of the system resource. A value of null indicates that the resource is not part of an application.

beanType - a String representing the type of the MBean resource on which access is being requested. The type is the fully qualified type. For example, weblogic.management.configuration.ServerMBean or weblogic.j2ee.descriptor.wl.jmxConnectionFactoryBean or A value of null indicates that the security policy for the resource pertains to all MBean types that match the other parameters of the resource specification.

target - a String representing the target of the MBean resource on which access is being requested. For an operation of invoke or find, the target is the method name. For an operation of get, getEncrypted, set, or setEncrypted, the target is the property name. For an operation of create or unregister, the target is always null. A value of null indicates that the security policy for the resource pertains to all methods or properties that match the other parameters of the resource specification.

Method Detail

getType

public String getType()
Gets the type of this resource (JMXResource).

Returns:
the String type of this resource.


getKeys

public String[] getKeys()
Gets keys for this resource.

Specified by:
getKeys in interface Resource
Specified by:
getKeys in class ResourceBase
Returns:
an array of Strings containing this resource's keys.


makeParent

protected Resource makeParent()
Gets a Resource object that represents the parent of the current JMXResource. If the resource does not have a parent, the value of null must be returned.

The parentage hierarchy for a system JMXResource is:

type=<jmx>, operation=get, application=mySystemResource, beanType=weblogic.j2ee.descriptor.wl.jmxConnectionFactoryBean, target=ServerAffinityEnabled
type=<jmx>, operation=get, application=mySystemResource, beanType=weblogic.j2ee.descriptor.wl.jmxConnectionFactoryBean
type=<jmx>, operation=get, application=mySystemResource
type=<jmx>, operation=get, application=, beanType=weblogic.j2ee.descriptor.wl.jmxConnectionFactoryBean, target=ServerAffinityEnabled
type=<jmx>, operation=get, application=, beanType=weblogic.j2ee.descriptor.wl.jmxConnectionFactoryBean
type=<jmx>, operation=get, application=
type=<jmx>, operation=get
type=<jmx>

Overrides:
makeParent in class ResourceBase
Returns:
the Resource object of the parent resource.


Documentation is available at
http://edocs.bea.com/wls/docs103
Copyright 2008 Oracle