|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.org.iscream.cms.server.componentmanager.ReferenceManager
public class ReferenceManager
This class returns references for global system objects. This class is used to create and return references to objects that are required throughout the system. Most of which are CORBA based. It also manages the ORB for the component. It is a singleton object with a static method to obtain a reference to it. This removes the need for passing references to all the objects it contains throughout a component.
Field Summary | |
---|---|
private ConfigurationManager |
_cm
The configuration manager |
private static ReferenceManager |
_instance
A reference to the single instance of this class |
private Logger |
_logger
The logger |
private String |
_name
This is the friendly identifier of the component this class is running in. |
private NamingContextExt |
_ns
The Naming Service |
private ORB |
_orb
The ORB |
private POA |
_rootPOA
The Root POA |
String |
REVISION
The current CVS revision of this class |
Constructor Summary | |
---|---|
private |
ReferenceManager()
This is a private constructor This ensures that the system performs according to a Singleton design pattern |
Method Summary | |
---|---|
void |
activatePOA()
Activates the POA Calls the dieWithError() if any exceptions happen! |
void |
bindToOrb(Servant objRef,
String name)
Binds a given servant with the given name to the naming service. |
private void |
dieWithError(String message)
If there are any CORBA errors this method is called with the error message. |
ConfigurationManager |
getCM()
Returns a reference to the configuration manager Calls the dieWithError() if any exceptions happen! |
Object |
getCORBARef(String name)
Obtains a CORBA reference through the naming service for the named object. |
static ReferenceManager |
getInstance()
This returns a reference to the single instance of the ReferenceManager. |
Logger |
getLogger()
Returns a reference to the logger This will throw a Error if there is an error |
NamingContextExt |
getNS()
Returns a reference to the Naming Service Calls the dieWithError() if any exceptions happen! |
ORB |
getORB()
Returns a reference to the ORB |
POA |
getRootPOA()
Returns a reference to the Root POA Calls the dieWithError() if any exceptions happen! |
private void |
recoverWithError(String message)
If there are any CORBA errors this method is called with the error message. |
String |
toString()
Overrides the Object.toString()
method to provide clean logging (every class should have this). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final String REVISION
private ORB _orb
private NamingContextExt _ns
private POA _rootPOA
private ConfigurationManager _cm
private Logger _logger
private String _name
private static ReferenceManager _instance
Constructor Detail |
---|
private ReferenceManager()
Method Detail |
---|
public static ReferenceManager getInstance()
public Object getCORBARef(String name)
name
- the name of the CORBA object to resolve
public void bindToOrb(Servant objRef, String name)
objRef
- a reverence to the servant objectname
- the name to bind to the naming service withpublic void activatePOA()
public String toString()
Object.toString()
method to provide clean logging (every class should have this).
This uses the uk.org.iscream.cms.util.NameFormat class
to format the toString()
toString
in class Object
private void recoverWithError(String message) throws ComponentCORBAException
message
- the error message to die with
ComponentCORBAException
private void dieWithError(String message)
message
- the error message to die withpublic ORB getORB()
public POA getRootPOA()
public NamingContextExt getNS()
public ConfigurationManager getCM()
public Logger getLogger()
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |