|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tranche.servers.ServerUtil
public class ServerUtil
A lazy-loading utility class that helps track which servers are currently on-line.
| Method Summary | |
|---|---|
static void |
addServerListener(RemoteTrancheServerListener l)
Adds a server listener to listen to all server communication. |
static boolean |
addServerListener(java.lang.String host,
RemoteTrancheServerListener l)
Adds a servers listener to listen only to the Tranche server with the given host name. |
static void |
clearServerListeners(java.lang.String host)
Removes all Tranche server listeners from the Tranche server with the given URL. |
static java.lang.String |
getHostName()
Returns the IP addresss of this Tranche server. |
static java.util.List<RemoteTrancheServerListener> |
getServerListeners(java.lang.String url)
Returns the server listeners that are listening to the Tranche server with the given URL. |
static boolean |
removeServerListener(java.lang.String host,
RemoteTrancheServerListener l)
Removes the given server listener from the set of server listeners for the Tranche server with the given URL. |
static void |
setHostName(java.lang.String host)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void addServerListener(RemoteTrancheServerListener l)
Adds a server listener to listen to all server communication.
l -
public static boolean addServerListener(java.lang.String host,
RemoteTrancheServerListener l)
Adds a servers listener to listen only to the Tranche server with the given host name.
host - l -
public static java.util.List<RemoteTrancheServerListener> getServerListeners(java.lang.String url)
Returns the server listeners that are listening to the Tranche server with the given URL.
url -
public static boolean removeServerListener(java.lang.String host,
RemoteTrancheServerListener l)
Removes the given server listener from the set of server listeners for the Tranche server with the given URL.
host - l -
public static void clearServerListeners(java.lang.String host)
Removes all Tranche server listeners from the Tranche server with the given URL.
host - public static java.lang.String getHostName()
public static void setHostName(java.lang.String host)
host -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||