Class ECaccessServer
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
ecmwf.common.callback.CallBackObject
ecmwf.common.ecaccess.StarterServer
ecmwf.common.ecaccess.ECaccessServer
- All Implemented Interfaces:
RemoteServer,MBeanListener,MBeanService,ToBeStarted,Serializable,Remote
- Direct Known Subclasses:
ECaccessProvider
The Class ECaccessServer.
- See Also:
-
Field Summary
Fields inherited from class java.rmi.server.RemoteObject
ref -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedECaccessServer(DataBase dataBase, Starter starter) Instantiates a new ecaccess server.ECaccessServer(Starter starter) Instantiates a new ecaccess server. -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(String attributeName) Gets the attribute.Gets the database.<T extends DataBase>
TgetDataBase(Class<T> clazz) Gets the database.Gets the ECuser.Gets the MBean info.voidhandleECuserUpdate(ECUser ecuser) Handle the ECuser update.abstract ECUserimportECUser(String user) Import ec user.Invoke.booleanisRegistredUser(String user) Checks if it is a registered user.newActivity(ECUser ecuser, String plugin, String host, String agent, String action, String comment, boolean error) New activity.newActivity(String user, String plugin, String host, String agent, String action, String comment, boolean error) New activity.New event.voidPurge the database.abstract voidpurgeDataBase(long milliseconds) Purge the database.booleansetAttribute(String name, Object value) Sets the attribute.voidshutdown()Shutdown.voidupdateECUser(String ecuser) Update the ECuser.voidUpdate the ECusers.Methods inherited from class ecmwf.common.ecaccess.StarterServer
exit, getGraceful, getInstance, getInstance, getMBeanCenter, getPluginContainer, getPluginInfos, getRemoteCnf, getRestart, getStartDate, getVersion, handle, handle, handleNotification, shutdownMethods inherited from class ecmwf.common.callback.CallBackObject
createOrGetRegistry, getPortMethods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObjectMethods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
-
Constructor Details
-
ECaccessServer
public ECaccessServer(Starter starter) throws SQLException, IOException, IllegalAccessException, InstantiationException, ClassNotFoundException, InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException, MalformedObjectNameException, InstanceNotFoundException, DataBaseException Instantiates a new ecaccess server.- Parameters:
starter- the starter- Throws:
SQLException- the SQL exceptionIOException- Signals that an I/O exception has occurred.IllegalAccessException- the illegal access exceptionInstantiationException- the instantiation exceptionClassNotFoundException- the class not found exceptionInstanceAlreadyExistsException- the instance already exists exceptionMBeanRegistrationException- the MBean registration exceptionNotCompliantMBeanException- the not compliant m bean exceptionMalformedObjectNameException- the malformed object name exceptionInstanceNotFoundException- the instance not found exceptionDataBaseException- the data base exception
-
ECaccessServer
protected ECaccessServer(DataBase dataBase, Starter starter) throws SQLException, IOException, IllegalAccessException, InstantiationException, ClassNotFoundException, InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException, MalformedObjectNameException, InstanceNotFoundException, DataBaseException Instantiates a new ecaccess server.- Parameters:
dataBase- the data basestarter- the starter- Throws:
SQLException- the SQL exceptionIOException- Signals that an I/O exception has occurred.IllegalAccessException- the illegal access exceptionInstantiationException- the instantiation exceptionClassNotFoundException- the class not found exceptionInstanceAlreadyExistsException- the instance already exists exceptionMBeanRegistrationException- the MBean registration exceptionNotCompliantMBeanException- the not compliant m bean exceptionMalformedObjectNameException- the malformed object name exceptionInstanceNotFoundException- the instance not found exceptionDataBaseException- the data base exception
-
-
Method Details
-
purgeDataBase
public void purgeDataBase()Purge the database. -
purgeDataBase
public abstract void purgeDataBase(long milliseconds) Purge the database.- Parameters:
milliseconds- the milliseconds
-
updateECUsers
public void updateECUsers()Update the ECusers. -
handleECuserUpdate
Handle the ECuser update. To be overwritten by classes that wish to do some special processing when a ECuser is updated.- Parameters:
ecuser- the ecuser
-
updateECUser
-
invoke
public Object invoke(String operationName, Object[] params, String[] signature) throws NoSuchMethodException, MBeanException Invoke. Invoke. Invoke.- Specified by:
invokein interfaceMBeanService- Overrides:
invokein classStarterServer- Parameters:
operationName- the operation nameparams- the paramssignature- the signature- Returns:
- the object
- Throws:
NoSuchMethodException- the no such method exceptionMBeanException- the MBean exception
-
getMBeanInfo
Gets the MBean info. Gets the MBean info. Gets the MBean info.- Specified by:
getMBeanInfoin interfaceMBeanService- Overrides:
getMBeanInfoin classStarterServer- Returns:
- the MBean info
-
setAttribute
public boolean setAttribute(String name, Object value) throws InvalidAttributeValueException, MBeanException Sets the attribute. Sets the attribute. Sets the attribute.- Specified by:
setAttributein interfaceMBeanService- Overrides:
setAttributein classStarterServer- 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. Gets the attribute.- Specified by:
getAttributein interfaceMBeanService- Overrides:
getAttributein classStarterServer- Parameters:
attributeName- the attribute name- Returns:
- the attribute
- Throws:
AttributeNotFoundException- the attribute not found exceptionMBeanException- the MBean exception
-
shutdown
public void shutdown()Shutdown. Shutdown. Shutdown.- Specified by:
shutdownin interfaceToBeStarted- Overrides:
shutdownin classStarterServer
-
getDataBase
-
getDataBase
-
newActivity
public Activity newActivity(String user, String plugin, String host, String agent, String action, String comment, boolean error) New activity.- Parameters:
user- the userplugin- the pluginhost- the hostagent- the agentaction- the actioncomment- the commenterror- the error- Returns:
- the activity
-
newActivity
public Activity newActivity(ECUser ecuser, String plugin, String host, String agent, String action, String comment, boolean error) New activity.- Parameters:
ecuser- the ecuserplugin- the pluginhost- the hostagent- the agentaction- the actioncomment- the commenterror- the error- Returns:
- the activity
-
newEvent
-
importECUser
-
getECUser
-
isRegistredUser
Checks if it is a registered user.- Parameters:
user- the user- Returns:
- true, if is registered user
-