| java.lang.Object org.jacorb.imr.ImRServerInfo
ImRServerInfo | public class ImRServerInfo implements java.io.Serializable(Code) | | This class contains the information about a logical server.
It has methods for managing the associated POAs, holding and
releasing the server, and, for the "client side", a method
that blocks until the server is released.
author: Nicolas Noffke version: $Id: ImRServerInfo.java,v 1.14 2006/07/14 11:41:38 alphonse.bendt Exp $ |
Method Summary | |
public void | addPOA(ImRPOAInfo poa) Adds a POA to this server. | public synchronized void | awaitRelease() This method blocks until the server is released, i.e. | protected String[] | getPOANames() Builds an array of of the names of the POAs associated with this server. | public synchronized void | release() Release the server and unblock all waiting threads. | public void | setDown() Sets the server down, i.e. | public void | setNotRestarting() | public synchronized boolean | shouldBeRestarted() Tests if this server should be restarted. | public ServerInfo | toServerInfo() "Converts" this Object to a ServerInfo instance containing
the same info as this object. |
active | protected boolean active(Code) | | |
holding | protected boolean holding(Code) | | |
restarting | protected boolean restarting(Code) | | |
serialVersionUID | final public static long serialVersionUID(Code) | | |
ImRServerInfo | public ImRServerInfo(String name, String host, String command) throws IllegalServerName(Code) | | The Constructor. It sets up the internal attributes.
Parameters: name - the logical server name Parameters: host - the name of the host on which the server should be restarted(ignored when no startup command is specified). Parameters: command - the startup command for this server, passed to theserver startup daemon on host (in case there is one active). exception: IllegalServerName - thrown when name isnull or of length zero. |
addPOA | public void addPOA(ImRPOAInfo poa)(Code) | | Adds a POA to this server.
Parameters: poa - the POA to add. |
awaitRelease | public synchronized void awaitRelease()(Code) | | This method blocks until the server is released, i.e. set
to not holding. This will not time out since holding a
server is only done by administrators.
|
getPOANames | protected String[] getPOANames()(Code) | | Builds an array of of the names of the POAs associated with this server.
This method is needed for deleting a server since its POAs have to be
as well removed from the central storage.
an array of POA names |
release | public synchronized void release()(Code) | | Release the server and unblock all waiting threads.
|
setDown | public void setDown()(Code) | | Sets the server down, i.e. not active. If a request for a POA
of this server is received, the repository tries to restart the server.
The server is automatically set back to active when the first of
its POAs gets reregistered.
|
setNotRestarting | public void setNotRestarting()(Code) | | |
shouldBeRestarted | public synchronized boolean shouldBeRestarted()(Code) | | Tests if this server should be restarted. That is the
case if the server is not active and nobody else is currently
trying to restart it.
If true is returned the server is set to restarting. That means
the thread calling this method has to restart the server,
otherwise it will stay down indefinetly.
true, if the server should be restarted by the calling thread. |
toServerInfo | public ServerInfo toServerInfo()(Code) | | "Converts" this Object to a ServerInfo instance containing
the same info as this object.
a ServerInfo object. |
|
|