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 ServerSessionobject - 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 ServerSessionobjName - The bean.JMExceptionpublic static ObjectName objectName(int sequence)
sequence - The object sequence number.public ObjectName nameFor(Object object)
ObjectNamesnameFor in interface ObjectNamesobject - The proxy.public Object objectFor(ObjectName objectName)
ObjectNamesobjectFor in interface ObjectNamesobjectName - The object name.public ArooaSession getArooaSession()
ServerSessiongetArooaSession in interface ServerSession