Class StarterServer
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
ecmwf.common.callback.CallBackObject
ecmwf.common.ecaccess.StarterServer
- All Implemented Interfaces:
RemoteServer
,MBeanListener
,MBeanService
,ToBeStarted
,Serializable
,Remote
- Direct Known Subclasses:
ECaccessServer
,HandlerServer
,MoverServer
public abstract class StarterServer
extends CallBackObject
implements MBeanService, MBeanListener, ToBeStarted, RemoteServer
The Class StarterServer.
- See Also:
-
Field Summary
Fields inherited from class java.rmi.server.RemoteObject
ref
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
StarterServer
(Starter starter) Instantiates a new starter server. -
Method Summary
Modifier and TypeMethodDescriptionvoid
exit()
Exit.getAttribute
(String attributeName) Gets the attribute.boolean
Gets the graceful.static final Object
Gets the single instance of StarterServer.static final <T> T
getInstance
(Class<T> clazz) Gets the single instance of StarterServer in the requested type.Gets the MBean center.Gets the MBean info.Gets the plugin container.Gets the plugin infos.Gets the remote cnf.boolean
Gets the restart.Gets the start date.abstract String
Gets the version.void
handle
(PluginEvent<?> event) Handle.void
handle
(PluginEvent<?>[] events) Handle.void
handleNotification
(String name) Handle notification.Invoke.boolean
setAttribute
(String name, Object value) Sets the attribute.void
shutdown()
Shutdown.void
shutdown
(boolean graceful, boolean restart) Shutdown.Methods inherited from class ecmwf.common.callback.CallBackObject
createOrGetRegistry, getPort
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
-
Constructor Details
-
StarterServer
protected StarterServer(Starter starter) throws IOException, InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException, MalformedObjectNameException, InstanceNotFoundException Instantiates a new starter server.- Parameters:
starter
- the starter- Throws:
IOException
- Signals that an I/O exception has occurred.InstanceAlreadyExistsException
- the instance already exists exceptionMBeanRegistrationException
- the MBean registration exceptionNotCompliantMBeanException
- the not compliant m bean exceptionMalformedObjectNameException
- the malformed object name exceptionInstanceNotFoundException
- the instance not found exception
-
-
Method Details
-
setAttribute
public boolean setAttribute(String name, Object value) throws InvalidAttributeValueException, MBeanException Sets the attribute. Sets the attribute.- Specified by:
setAttribute
in interfaceMBeanService
- Parameters:
name
- the namevalue
- the value- Returns:
- true, if successful
- Throws:
InvalidAttributeValueException
- the invalid attribute value exceptionMBeanException
- the MBean exception
-
getAttribute
Gets the attribute. Gets the attribute.- Specified by:
getAttribute
in interfaceMBeanService
- Parameters:
attributeName
- the attribute name- Returns:
- the attribute
- Throws:
AttributeNotFoundException
- the attribute not found exceptionMBeanException
- the MBean exception
-
invoke
public Object invoke(String operationName, Object[] params, String[] signature) throws NoSuchMethodException, MBeanException Invoke. Invoke.- Specified by:
invoke
in interfaceMBeanService
- Parameters:
operationName
- the operation nameparams
- the paramssignature
- the signature- Returns:
- the object
- Throws:
NoSuchMethodException
- the no such method exceptionMBeanException
- the MBean exception
-
getVersion
-
getGraceful
public boolean getGraceful()Gets the graceful.- Returns:
- the graceful
-
getRestart
public boolean getRestart()Gets the restart.- Returns:
- the restart
-
getMBeanInfo
Gets the MBean info. Gets the MBean info.- Specified by:
getMBeanInfo
in interfaceMBeanService
- Returns:
- the MBean info
-
shutdown
public void shutdown(boolean graceful, boolean restart) Shutdown.- Parameters:
graceful
- the gracefulrestart
- the restart
-
shutdown
-
exit
public void exit()Exit. -
getPluginContainer
Gets the plugin container.- Returns:
- the plugin container
-
handle
-
handle
-
getPluginInfos
Gets the plugin infos. Gets the plugin infos.- Specified by:
getPluginInfos
in interfaceRemoteServer
- Returns:
- the plugin infos
-
getRemoteCnf
-
handleNotification
Handle notification. Handle notification.- Specified by:
handleNotification
in interfaceMBeanListener
- Parameters:
name
- the name
-
getStartDate
-
getMBeanCenter
-
getInstance
Gets the single instance of StarterServer.- Returns:
- the object
-
getInstance
Gets the single instance of StarterServer in the requested type.- Type Parameters:
T
- the generic type- Parameters:
clazz
- the clazz- Returns:
- the t object
-