public class RMRegistryServerImpl extends Object implements RMRegistryServer
| Constructor and Description |
|---|
RMRegistryServerImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
available(String target)
Checks if a user is availabe, available means in this context if you could send a message to this user and use
the other offered services.
|
boolean |
available(String target,
String ipAddress)
Actually the same method as available(String target) but with the difference that not only if one target user is
online this account is available.
|
void |
deregister(RMInfo info)
This method is the pendant to the register method and deregisters a rmplugin by deleting the mapping between
qualified name and RMInfo object.
|
ArrayList<String> |
getAllActiveDomains()
This Method delivers all domain in which are currently user registrated.
|
ArrayList<String> |
getAllActiveGroups(String domain)
This Method returns all groups within a specific domain.
|
ArrayList<RMUser> |
getAllActiveUsers(String group,
String domain)
This Method returns all active user specified by a group and a domain.
|
ArrayList<RMUser> |
getAllUsers()
This method returns every user registered in the RMRegistry in an ArrayList.
|
protected int |
getTotalCountOfLastSendMessages()
Returns how many messages are send at last invocation of sendMessage().
|
protected int |
getUserCount()
Getter for the actual count of users online.
|
void |
logCurrentRegistry()
This method logs the current content of the registry to the log4j logger in the way qualified name --> rmiAdress.
|
void |
register(RMInfo info)
This Method registers an RMPlugin in the RMRegistry.
|
int |
sendMessage(String target,
String message,
String title)
This method is the heart of RMRegistry implementation and provides the main functionallity.
|
int |
sendMessage(String target,
String ipAddress,
String message,
String title)
Actually the same as the Method sendMessage(String,String) but with this method it is possible to further select
the user via the ipAddress.
|
void |
startRMRegistryServer(int port)
This Constructor initializes RMI Registry with the given port.
|
void |
stopRMRegistryServer()
This method is responsible for unbinding the RMRegistry Object.
|
void |
updateRegistry()
This method updates the registry that means every dead rmObject (if there is any problem by using the remote
methods) will be removed from the RMRegistry.
|
public void startRMRegistryServer(int port)
throws RemoteException
port - The port which registry should be used or if no one exist where to createRemoteException - java.lang.Exception This method forwards any uncatched exceptionpublic void stopRMRegistryServer()
throws Exception
Exception - java.lang.Exception Any Exception thrown in this method will be forwarded to the next higher
instancepublic boolean available(String target)
available in interface RMForwardertarget - The target is a string identifier build up out of three components seperated by @'s. The
identifier contains username, group and domain. for example heinz@ketschup@lecker where heinz
indicates the user, ketschup the group and lecker the domain.public boolean available(String target, String ipAddress)
available in interface RMForwardertarget - The target is a string identifier build up out of three components seperated by @'s. The
identifier contains username, group and domain. for example heinz@ketschup@lecker where heinz
indicates the user, ketschup the group and lecker the domain.ipAddress - the ipAddress of the userpublic int sendMessage(String target, String message, String title) throws UnableToSendMessageException
sendMessage in interface RMForwardertarget - The target is a string identifier build up out of three components seperated by @'s. The
identifier contains username, group and domain. for example heinz@ketschup@lecker where heinz
indicates the user, ketschup the group and lecker the domain.message - the message which should be send to the usertitle - the a short title of the messageUnableToSendMessageException - Sirius.server.registry.rmplugin.exception.UnableToSendMessageException
This Exception is thrown if any attemp to send a message to an user
identified by the target string fails due to extern circumstances for
example a remote Exception.public int sendMessage(String target, String ipAddress, String message, String title) throws UnableToSendMessageException
sendMessage in interface RMForwardertarget - The target is a string identifier build up out of three components seperated by @'s. The
identifier contains username, group and domain. for example heinz@ketschup@lecker where heinz
indicates the user, ketschup the group and lecker the domain.ipAddress - the ipAddress to which the message should be sendmessage - the message which should be send to the usertitle - the a short title of the messageUnableToSendMessageException - Sirius.server.registry.rmplugin.exception.UnableToSendMessageException
This Exception is thrown if any attemp to send a message to an user
identified by the target string fails due to extern circumstances for
example a remote Exception.public void register(RMInfo info)
register in interface RMRegistryinfo - This object contains all the information of the object who is asking for registration.public void deregister(RMInfo info) throws UnableToDeregisterException
deregister in interface RMRegistryinfo - The object which should be removed from the RMRegistryUnableToDeregisterException - Sirius.server.registry.rmplugin.exception.UnableToDeregisterException This
Exception is thrown if the object which should be deregister does not exist
in the RMRegistrypublic ArrayList<String> getAllActiveDomains()
getAllActiveDomains in interface RMForwarderpublic ArrayList<String> getAllActiveGroups(String domain)
getAllActiveGroups in interface RMForwarderdomain - Only the groups specified by this domain will be checkedpublic ArrayList<RMUser> getAllActiveUsers(String group, String domain)
getAllActiveUsers in interface RMForwardergroup - the group which should be checkeddomain - the domain which should be checkedpublic ArrayList<RMUser> getAllUsers()
getAllUsers in interface RMForwarderpublic void updateRegistry()
updateRegistry in interface RMForwarderpublic void logCurrentRegistry()
logCurrentRegistry in interface RMForwarderprotected int getUserCount()
protected int getTotalCountOfLastSendMessages()
Copyright © 2012–2026 cismet GmbH. All rights reserved.