| org.jacorb.imr.ImplementationRepositoryImpl
ImplementationRepositoryImpl | public class ImplementationRepositoryImpl extends ImplementationRepositoryPOA (Code) | | This is the main class of the JacORB implementation repository.
It keeps track of the registered POAs with lifespan policy
PERSISTENT and provides a way for migrating and restarting
the POAS servers.
author: Nicolas Noffke author: $Id: ImplementationRepositoryImpl.java,v 1.66 2007/02/06 23:47:53 andre.spiegel Exp $ |
ImplementationRepositoryImpl | public ImplementationRepositoryImpl(org.omg.CORBA.ORB orb)(Code) | | The constructor.
It builds up the server table and starts up the SocketListener thread.
|
configure | public void configure(Configuration myConfiguration) throws ConfigurationException(Code) | | |
edit_server | public void edit_server(String name, String command, String host) throws UnknownServerName(Code) | | Updates the server with a new command and host. For migrating purposes.
Parameters: name - the servers name. Parameters: command - the new startup command for this server. Parameters: host - the new host. exception: UnknownServerName - a server with name has not been registered. |
get_imr_info | public ImRInfo get_imr_info()(Code) | | Get host and port (wrapped inside an ImRInfo object) of this repository.
the ImRInfo object of this repository. |
get_server_info | public ServerInfo get_server_info(String server) throws UnknownServerName(Code) | | Get the ServerInfo object of a specific server.
Parameters: server - the servers name. the ServerInfo object of the server with name server exception: UnknownServerName - the server server has not been registered. |
hold_server | public void hold_server(String name) throws UnknownServerName(Code) | | Hold a server. This causes all requests for this server to be delayed
until it is released. Holding a server is useful for migrating or
maintaining it. There is not timeout set, so requests might be delayed
indefinetly (or, at least, until the communication layer protests;-).
Parameters: name - the servers name. exception: org.jacorb.imr.UnknownServerName - a server with name has not been registered. |
list_hosts | public HostInfo[] list_hosts()(Code) | | List all hosts currently registered with this repository.
It is not guaranteed that the references inside the HostInfo
objects are still valid.
an array containing all known hosts. |
list_servers | public ServerInfo[] list_servers()(Code) | | List all registered server. The ServerInfo objects contain also
a list of the associated POAs.
an array containing all registered servers. |
main | public static void main(String[] args)(Code) | | The main method. "Parses" the arguments and sets the corresponding
attributes up, creates a new ImplementationRepositoryImpl instance and
runs the ORB.
|
register_host | public void register_host(HostInfo host) throws IllegalHostName, InvalidSSDRef(Code) | | Register a new host with a server startup daemon.
Parameters: host - a HostInfo object containing the hosts name and a reference to itsServerStartupDaemon object. exception: org.jacorb.imr.RegistrationPackage.IllegalHostName - name is not valid. exception: org.jacorb.imr.RegistrationPackage.InvalidSSDRef - It was impossible to connectto the daemon. |
register_poa | public void register_poa(String name, String server, String host, int port) throws IllegalPOAName, DuplicatePOAName, UnknownServerName(Code) | | This method registers a POA. It has actually two functions:
- Register a POA that has not yet been registered. It is the added to the
server table.
- Reactivating a POA that is not active, but has already an entry
in the server table
The reason for using only one method for those two tasks is that it is
much more difficult for the ORB, which does the registering, to distinguish
between an newly created POA and a restarted one.
Parameters: name - the POAs name. Parameters: server - the logical server name of the server the running in. Parameters: host - the POAs host. Parameters: port - the POas port. exception: org.jacorb.imr.RegistrationPackage.IllegalPOAName - the POAs name is not valid. exception: org.jacorb.imr.RegistrationPackage.DuplicatePOAName - an active POA withname is currently registered. exception: org.jacorb.imr.UnknownServerName - The server has not been registered. |
register_server | public void register_server(String name, String command, String host) throws IllegalServerName, DuplicateServerName(Code) | | Register a logical server. The logical server corresponds to a process
which has a number of POAs.
Parameters: name - the servers name. Parameters: command - the startup command for this server if it should be restartedon demand. Has to be empty (NOT null) if the server should not be restarted. Parameters: host - the host on which the server should be restarted. Should notbe null, but is ignored if no startup command is specified. exception: org.jacorb.imr.AdminPackage.IllegalServerName - the servers name is not valid. exception: org.jacorb.imr.AdminPackage.DuplicateServerName - a server with name has already been registered. |
release_server | public void release_server(String name) throws UnknownServerName(Code) | | Release a server from state "holding".
Parameters: name - the servers name. exception: org.jacorb.imr.UnknownServerName - a server with name has not been registered. |
save_server_table | public void save_server_table() throws FileOpFailed(Code) | | Save the server table to a backup file.
exception: org.jacorb.imr.AdminPackage.FileOpFailed - something went wrong. |
set_server_down | public void set_server_down(String server) throws UnknownServerName(Code) | | This method sets a server down, i.e. not.active. If a request for
that server is encountered, the server is tried to be restarted.
Parameters: server - the servers name. exception: org.jacorb.imr.UnknownServerName - No server with nameserver has been registered. |
shutdown | public void shutdown(boolean wait)(Code) | | Shut the repository down orderly, i.e. with saving of the server table.
The actual shutdown is done in the SocketListener thread because, if
done from here, the orb wont shut don correctly because this connection
is still active. (See end of SocketListener.run())
Parameters: wait - wait_for_completion (from ORB.shutdown()). If false, then the ORBis forced down, ignoring any open connection. |
start_server | public void start_server(String name) throws UnknownServerName, ServerStartupFailed(Code) | | Start a server.
Parameters: name - the servers name. exception: org.jacorb.imr.UnknownServerName - a server with name has not been registered. |
unregister_host | public void unregister_host(String name) throws UnknownHostName(Code) | | Remove a host from the servertable. Hosts are removed
automatically on server startup, if they can't be accessed.
Parameters: name - the hosts name. exception: UnknownHostName - no host with that name known. |
unregister_server | public void unregister_server(String name) throws UnknownServerName(Code) | | Remove a logical server from the server table. If a server is removed, all of its POAs
are removed as well.
Parameters: name - the servers name. exception: org.jacorb.imr.UnknownServerName - a server with name has not been registered. |
usage | public static void usage()(Code) | | Prints the usage screen and exits.
|
|
|