org.openorb.notify
Class Service

java.lang.Object
  |
  +--org.openorb.notify.Service
All Implemented Interfaces:
org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.activity.Startable

public class Service
extends java.lang.Object
implements org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.activity.Startable

Lifecycle manager for the Notification Service.

Author:
Olivier Modica, Shawn Boyce, Gary Shea

Constructor Summary
Service()
           
 
Method Summary
 void bindIntoCorbalocService()
          Bind the NotificationService into the Corbaloc Service
 void bindIntoNamingService()
          Bind the EventChannelFactory to the Naming Service.
 void contextualize(org.apache.avalon.framework.context.Context context)
           
 void enableLogging(org.apache.avalon.framework.logger.Logger logger)
           
 java.lang.String getEventChannelFactoryCorbaloc()
           
 java.lang.String getEventChannelFactoryIOR()
           
 void initialize()
           
 void start()
           
 void stop()
          Destroying the POA cleanly sounds like a decent first shot at a stop() operation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Service

public Service()
Method Detail

bindIntoCorbalocService

public void bindIntoCorbalocService()
                             throws org.omg.CORBA.ORBPackage.InvalidName
Bind the NotificationService into the Corbaloc Service
Throws:
org.omg.CORBA.ORBPackage.InvalidName - if "CorbalocService" is an invalid name (i.e., never thrown)

bindIntoNamingService

public void bindIntoNamingService()
                           throws org.omg.CORBA.ORBPackage.InvalidName,
                                  org.omg.PortableServer.POAPackage.ServantNotActive,
                                  org.omg.PortableServer.POAPackage.WrongPolicy,
                                  org.omg.CosNaming.NamingContextPackage.AlreadyBound,
                                  org.omg.CosNaming.NamingContextPackage.CannotProceed,
                                  org.omg.CosNaming.NamingContextPackage.InvalidName,
                                  org.omg.CosNaming.NamingContextPackage.NotFound
Bind the EventChannelFactory to the Naming Service. Knowledge of the location of the Naming Service is the responsibility of the ORB.
Throws:
org.omg.CORBA.ORBPackage.InvalidName - should never be thrown, since "NameService" is always a valid initial reference key.
org.omg.CosNaming.NamingContextPackage.AlreadyBound - if a race condition exists and another request succeeds in binding a Notification Service to the naming service.
org.omg.CosNaming.NamingContextPackage.CannotProceed - if the naming service implementation has given up for some reason.
org.omg.CosNaming.NamingContextPackage.InvalidName - should never be called as "NotificationService" is a valid id and "" is a valid kind.
org.omg.CosNaming.NamingContextPackage.NotFound - if a race condition exists and another request has deleted the existing Notification Service.

getEventChannelFactoryIOR

public java.lang.String getEventChannelFactoryIOR()

getEventChannelFactoryCorbaloc

public java.lang.String getEventChannelFactoryCorbaloc()

contextualize

public void contextualize(org.apache.avalon.framework.context.Context context)
                   throws org.apache.avalon.framework.context.ContextException
Specified by:
contextualize in interface org.apache.avalon.framework.context.Contextualizable

enableLogging

public void enableLogging(org.apache.avalon.framework.logger.Logger logger)
Specified by:
enableLogging in interface org.apache.avalon.framework.logger.LogEnabled

initialize

public void initialize()
                throws java.lang.ClassNotFoundException,
                       org.omg.CORBA.ORBPackage.InvalidName,
                       org.omg.CosPersistentState.NotFound
Specified by:
initialize in interface org.apache.avalon.framework.activity.Initializable
Throws:
java.lang.ClassNotFoundException -  
org.omg.CORBA.ORBPackage.InvalidName -  
org.omg.CoSPersistentState.NotFound -  

start

public void start()
           throws org.omg.CORBA.ORBPackage.InvalidName,
                  org.omg.PortableServer.POAPackage.AdapterAlreadyExists,
                  org.omg.PortableServer.POAPackage.InvalidPolicy,
                  org.omg.PortableServer.POAPackage.ObjectAlreadyActive,
                  org.omg.PortableServer.POAPackage.ServantAlreadyActive,
                  org.omg.PortableServer.POAPackage.WrongPolicy
Specified by:
start in interface org.apache.avalon.framework.activity.Startable
Throws:
org.omg.CORBA.ORBPackage.InvalidName -  
org.omg.PortableServer.POAPackage.AdapterAlreadyExists -  
org.omg.PortableServer.POAPackage.InvalidPolicy, -  
org.omg.PortableServer.POAPackage.ObjectAlreadyActive, -  
org.omg.PortableServer.POAPackage.ServantAlreadyActive, -  
org.omg.PortableServer.POAPackage.WrongPolicy -  

stop

public void stop()
Destroying the POA cleanly sounds like a decent first shot at a stop() operation.
Specified by:
stop in interface org.apache.avalon.framework.activity.Startable