Java Doc for ImplementationRepositoryImpl.java in  » Collaboration » JacORB » org » jacorb » imr » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Collaboration » JacORB » org.jacorb.imr 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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 $



Constructor Summary
public  ImplementationRepositoryImpl(org.omg.CORBA.ORB orb)
     The constructor.

Method Summary
public  voidconfigure(Configuration myConfiguration)
    
public  voidedit_server(String name, String command, String host)
     Updates the server with a new command and host.
public  StringgetIORFile()
    
public  ImRInfoget_imr_info()
     Get host and port (wrapped inside an ImRInfo object) of this repository.
public  ServerInfoget_server_info(String server)
     Get the ServerInfo object of a specific server.
Parameters:
  server - the servers name.
public  voidhold_server(String name)
     Hold a server.
public  HostInfo[]list_hosts()
     List all hosts currently registered with this repository.
public  ServerInfo[]list_servers()
     List all registered server.
public static  voidmain(String[] args)
     The main method.
public  voidregister_host(HostInfo host)
     Register a new host with a server startup daemon.
public  voidregister_poa(String name, String server, String host, int port)
     This method registers a POA.
public  voidregister_server(String name, String command, String host)
     Register a logical server.
public  voidrelease_server(String name)
     Release a server from state "holding".
public  voidsave_server_table()
     Save the server table to a backup file.
public  voidset_server_down(String server)
     This method sets a server down, i.e.
public  voidshutdown(boolean wait)
     Shut the repository down orderly, i.e.
public  voidstart_server(String name)
     Start a server.
public  voidunregister_host(String name)
     Remove a host from the servertable.
public  voidunregister_server(String name)
     Remove a logical server from the server table.
public static  voidusage()
     Prints the usage screen and exits.


Constructor Detail
ImplementationRepositoryImpl
public ImplementationRepositoryImpl(org.omg.CORBA.ORB orb)(Code)
The constructor. It builds up the server table and starts up the SocketListener thread.




Method Detail
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 namehas not been registered.



getIORFile
public String getIORFile()(Code)



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 namehas 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 namehas 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.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.