Java Reference
In-Depth Information
{
Entry[] newlabels = { entry };
Entry[] labels = { old };
jm.modifyAttributes( labels, newlabels );
}
}
private void createService()
{
try
{
JINIConnector connector =
new JINIConnectorImpl( this );
E
Set up Jini
service
Entry[] labels = { entry };
LookupDiscoveryManager mgr =
new LookupDiscoveryManager( groups, null, null );
D
Create
JoinManager
jm = new JoinManager(connector, labels, this,
mgr,
new LeaseRenewalManager());
enabled = true;
}
catch( Exception e )
{
e.printStackTrace();
}
E
Set up Jini
service
}
/*
call back methods
*/
public Integer getMBeanCount() throws Exception
{
return mbs.getMBeanCount();
}
F
Implement
remaining methods
public ObjectInstance createMBean(String className,
ObjectName name) throws Exception
{
return mbs.createMBean( className, name );
}
}
B
These import statements import packages from the Jini toolkit. These packages
contain the classes needed to find lookup services and manage and describe Jini
services. All of these packages come with the downloadable Jini toolkit from
Sun Microsystems.
Search WWH ::




Custom Search