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