public class OddjobMBeanFactory extends java.lang.Object implements ServerSession
Constructor and Description |
---|
OddjobMBeanFactory(javax.management.MBeanServer server,
ArooaSession session)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
long |
createMBeanFor(java.lang.Object object,
ServerContext context)
Create an MBean and register with the server using the generated name.
|
void |
destroy(long objectId)
Remove a bean from the server.
|
ArooaSession |
getArooaSession()
Get the session used by the server.
|
long |
idFor(java.lang.Object object)
Get the remote Id for the give component object.
|
java.lang.Object |
objectFor(long remoteId)
Get the component for the given remote Id.
|
static javax.management.ObjectName |
objectName(long sequence)
Helper function to build the object name from the sequence number.
|
public OddjobMBeanFactory(javax.management.MBeanServer server, ArooaSession session)
server
- The server to register newly created beans with.public long createMBeanFor(java.lang.Object object, ServerContext context) throws javax.management.JMException
createMBeanFor
in interface ServerSession
object
- The object the MBean is wrapping.context
- The context.javax.management.JMException
- If the MBean fails to register.public void destroy(long objectId) throws javax.management.JMException
destroy
in interface ServerSession
objectId
- The bean.javax.management.JMException
public static javax.management.ObjectName objectName(long sequence)
sequence
- The object sequence number.public long idFor(java.lang.Object object)
RemoteIdMappings
idFor
in interface RemoteIdMappings
object
- The component.public java.lang.Object objectFor(long remoteId)
RemoteIdMappings
objectFor
in interface RemoteIdMappings
remoteId
- The remote Id.public ArooaSession getArooaSession()
ServerSession
getArooaSession
in interface ServerSession