Java Reference
In-Depth Information
Integer.MAX_VALUE );
server = ( JINIConnector ) items.items[ 0 ].service;
System.out.println( "service found" );
}
catch( Exception e )
{
e.printStackTrace();
}
}
public void discarded( DiscoveryEvent event ){}
D
Implement
getMBeanCount()
method
public Integer getMBeanCount()
{
try
{
return server.getMBeanCount();
}
catch( JINIConnectorException e )
{
return null;
}
}
public ObjectInstance createMBean(String className,
ObjectName name)
throws ReflectionException,
InstanceAlreadyExistsException,
MBeanRegistrationException, MBeanException,
NotCompliantMBeanException
{
try
{
return server.createMBean( className, name );
}
catch( JINIConnectorException e )
{
Exception ex = e.getWrappedException();
if( ex instanceof ReflectionException )
throw ( ReflectionException ) ex;
else if( ex instanceof InstanceAlreadyExistsException )
throw ( InstanceAlreadyExistsException ) ex;
else if( ex instanceof MBeanRegistrationException )
throw ( MBeanRegistrationException ) ex;
else if( ex instanceof MBeanException )
throw ( MBeanException ) ex;
else
throw ( NotCompliantMBeanException ) ex;
}
E
Implement
createMBean()
}
/*
Search WWH ::




Custom Search