Java Reference
In-Depth Information
server.invoke(routingTableName, "removePhoneRoute",
params, sig);
}
catch(Exception e)
{
System.out.println("Relation MBean::Error Removing "
+" Phone Card:"+e);
throw new MBeanException(e);
}
}
C
public void disableFaxCard() throws MBeanException
{
System.out.println("Relation MBean::Disabling Fax Card");
try
{
ObjectName faxCardName = new ObjectName(
"JMXBookAgent:name=faxCard");
ObjectName routingTableName = new ObjectName(
"JMXBookAgent:name=routingTable");
server.invoke(faxCardName, "disable", null, null);
server.invoke(routingTableName, "removeFaxRoute", null, null);
}
catch(Exception e)
{
System.out.println("Relation MBean::"
+ "Error Removing Fax Card:"+e);
throw new MBeanException(e);
}
}
public ObjectName preRegister( MBeanServer server,
ObjectName name )
throws Exception
{
this.server = server;
return name;
}
}
B
The CtlRelation class is the MBean class in the scenario description that allows
the user to disable device cards and update the routing table in a single step. It
extends the RelationSupport class in order to provide an implementation for the
RelationSupportMBean interface extended by the CtlRelationMBean interface. The
RelationSupport methods provide a mechanism for the relation service to vali-
date this external relation against its relation type.
Search WWH ::




Custom Search