raccoon.tibco.tibrv.endpoint
Class TibrvNucleus

java.lang.Object
  extended by raccoon.core.types.AbsComponent
      extended by raccoon.core.types.AbsLoadable
          extended by raccoon.core.types.AbsConfigurableLoadable
              extended by raccoon.core.types.AbsComponentManager
                  extended by raccoon.tibco.tibrv.endpoint.TibrvNucleus
All Implemented Interfaces:
INucleus, IBaseComponent, IConfigurable, ILoadable, ILogable

public class TibrvNucleus
extends AbsComponentManager
implements INucleus

The implementation of INucleus for TIB/Rendezvous.

Since:
Raccoon v1.0
Version:
$Id:$
Author:
Cedric ROUVRAIS

Field Summary
static java.lang.String PTY_ADMIN_SUBJECT
           
static java.lang.String PTY_CONFIG
           
static java.lang.String PTY_DAEMON
           
static java.lang.String PTY_EMBEDDED_LICENSE
           
static java.lang.String PTY_NB_DISPATCHERS
           
static java.lang.String PTY_NETWORK
           
static java.lang.String PTY_QUEUE_NAME
           
static java.lang.String PTY_SERVICE
           
static java.lang.String PTY_TRANSPORT_TYPE
           
 
Fields inherited from class raccoon.core.types.AbsConfigurableLoadable
mConfigurableManager
 
Fields inherited from class raccoon.core.types.AbsLoadable
mIsLoaded
 
Fields inherited from class raccoon.core.types.AbsComponent
mIsInError
 
Constructor Summary
TibrvNucleus()
          Default constructor required for dynamic instanciation
 
Method Summary
 void configureParameters()
          Configures the various parameters for this component.
 java.lang.String getAdminSubject()
           
 IConfig getConfig()
           
 java.lang.String getDaemon()
          The daemon to which this nucleus is connected.
 java.lang.String getDescription()
          The description of this Nucleus and the underlying transport.
 java.lang.String getEmbeddedLicense()
           
 int getNbDispatchers()
           
 java.lang.String getNetwork()
          The network parameter of this TIB/Rendezvous transport.
 IPublisher getPublisher(java.lang.String pPublisherName)
          Retrieves a specific publisher based upon it's logical name.
 java.lang.String getQueueName()
          The name of the dispatching queue.
 java.lang.String getService()
          The service being used by this nucleus.
 ISubscriber getSubscriber(java.lang.String pSubscriberName)
          Retrieves a specific subscriber based upon it's logical name.
 int getTransportType()
          The transport type used currently (Reliable, Certified, ...)
 void load()
          Invoked by the service manager to start this component once it has been configured.
protected  IBaseComponent loadComponent(java.lang.String pComponentName)
          Generates a new instance of ComponentBase, must be implemented by inheriting classes.
 void setAdminSubject(java.lang.String pAdminSubject)
           
 void setConfig(IConfig pConfig)
           
 void setDaemon(java.lang.String pDaemon)
          Defines the daemon parameter to which this transport is connected.
 void setDescription(java.lang.String pDescription)
          Defines the description of this nucleus.
 void setEmbeddedLicense(java.lang.String pEmbeddedLicense)
           
 void setNbDispatchers(int pNbDispatchers)
           
 void setNetwork(java.lang.String pNetwork)
          Assigns the network for the TIB/Rendezvous transport.
 void setQueueName(java.lang.String pQueueName)
          Assigns the name of the queue.
 void setService(java.lang.String pService)
          Defines the service that this nucleus is to use.
 void setTransportType(int pTransportType)
          Defines the transport type to be used (Reliable, Certified, ...)
 void unload()
          Invoked by the service manager to stop this component.
 
Methods inherited from class raccoon.core.types.AbsComponentManager
clear, isLoaded, isLogable, lookup
 
Methods inherited from class raccoon.core.types.AbsConfigurableLoadable
isStable, setConfigurableManager, setLogger
 
Methods inherited from class raccoon.core.types.AbsLoadable
getLog, isInError, isInitialised, isRunning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PTY_CONFIG

public static final java.lang.String PTY_CONFIG
See Also:
Constant Field Values

PTY_SERVICE

public static final java.lang.String PTY_SERVICE
See Also:
Constant Field Values

PTY_NETWORK

public static final java.lang.String PTY_NETWORK
See Also:
Constant Field Values

PTY_DAEMON

public static final java.lang.String PTY_DAEMON
See Also:
Constant Field Values

PTY_QUEUE_NAME

public static final java.lang.String PTY_QUEUE_NAME
See Also:
Constant Field Values

PTY_TRANSPORT_TYPE

public static final java.lang.String PTY_TRANSPORT_TYPE
See Also:
Constant Field Values

PTY_EMBEDDED_LICENSE

public static final java.lang.String PTY_EMBEDDED_LICENSE
See Also:
Constant Field Values

PTY_ADMIN_SUBJECT

public static final java.lang.String PTY_ADMIN_SUBJECT
See Also:
Constant Field Values

PTY_NB_DISPATCHERS

public static final java.lang.String PTY_NB_DISPATCHERS
See Also:
Constant Field Values
Constructor Detail

TibrvNucleus

public TibrvNucleus()
Default constructor required for dynamic instanciation

Method Detail

configureParameters

public void configureParameters()
Configures the various parameters for this component. This method should configure the instance of IConfigurableManager provided during the invocation of AbsConfigurableLoadable.setConfigurableManager(IConfigurableManager).

Specified by:
configureParameters in interface IConfigurable
Overrides:
configureParameters in class AbsConfigurableLoadable

getAdminSubject

public java.lang.String getAdminSubject()

setAdminSubject

public void setAdminSubject(java.lang.String pAdminSubject)
                     throws ResourceNotFoundException
Throws:
ResourceNotFoundException

getEmbeddedLicense

public java.lang.String getEmbeddedLicense()

setEmbeddedLicense

public void setEmbeddedLicense(java.lang.String pEmbeddedLicense)
                        throws ResourceNotFoundException
Throws:
ResourceNotFoundException

getNbDispatchers

public int getNbDispatchers()

setNbDispatchers

public void setNbDispatchers(int pNbDispatchers)

getService

public java.lang.String getService()
The service being used by this nucleus.

Returns:
the TIB/Rendezvous service

setService

public void setService(java.lang.String pService)
                throws RaccoonException,
                       java.lang.IllegalArgumentException,
                       java.lang.InternalError
Defines the service that this nucleus is to use.

Parameters:
pService - a valid TIB/Rendezvous nucleus.
Throws:
RaccoonException - if this component is already running: the component can't be changed. Error code is ErrorCodes.COMPONENT_INITIALISED
java.lang.IllegalArgumentException - if the parameter is null, the message is obtained via MsgHelper.formatNullParamter(java.lang.String, java.lang.Class)
java.lang.InternalError - if the property pParamName hasn't been defined.

getNetwork

public java.lang.String getNetwork()
The network parameter of this TIB/Rendezvous transport.

Returns:
the network parameter.

setNetwork

public void setNetwork(java.lang.String pNetwork)
                throws RaccoonException,
                       java.lang.IllegalArgumentException,
                       java.lang.InternalError
Assigns the network for the TIB/Rendezvous transport.

Parameters:
pNetwork - the network parameter.
Throws:
RaccoonException - if this component is already running: the component can't be changed. Error code is ErrorCodes.COMPONENT_INITIALISED
java.lang.IllegalArgumentException - if the parameter is null, the message is obtained via MsgHelper.formatNullParamter(java.lang.String, java.lang.Class)
java.lang.InternalError - if the property pParamName hasn't been defined.

getDaemon

public java.lang.String getDaemon()
The daemon to which this nucleus is connected.

Returns:
the daemon parameter transport.

setDaemon

public void setDaemon(java.lang.String pDaemon)
               throws RaccoonException,
                      java.lang.IllegalArgumentException,
                      java.lang.InternalError
Defines the daemon parameter to which this transport is connected.

Parameters:
pDaemon - the daemon for the TIB/Rendezvous transport.
Throws:
RaccoonException - if this component is already running: the component can't be changed. Error code is ErrorCodes.COMPONENT_INITIALISED
java.lang.IllegalArgumentException - if the parameter is null, the message is obtained via MsgHelper.formatNullParamter(java.lang.String, java.lang.Class)
java.lang.InternalError - if the property pParamName hasn't been defined.

getTransportType

public int getTransportType()
The transport type used currently (Reliable, Certified, ...)

Returns:
the transport type.

setTransportType

public void setTransportType(int pTransportType)
                      throws RaccoonException,
                             java.lang.IllegalArgumentException,
                             java.lang.InternalError
Defines the transport type to be used (Reliable, Certified, ...)

Parameters:
pTransportType - the transport type.
Throws:
RaccoonException - if this component is already running: the component can't be changed. Error code is ErrorCodes.COMPONENT_INITIALISED
java.lang.IllegalArgumentException - if the parameter is null, the message is obtained via MsgHelper.formatNullParamter(java.lang.String, java.lang.Class)
java.lang.InternalError - if the property pParamName hasn't been defined.

getQueueName

public java.lang.String getQueueName()
The name of the dispatching queue.

Returns:
the queue name.

setQueueName

public void setQueueName(java.lang.String pQueueName)
                  throws RaccoonException,
                         java.lang.IllegalArgumentException,
                         java.lang.InternalError
Assigns the name of the queue.

Parameters:
pQueueName - the name of the queue.
Throws:
RaccoonException - if this component is already running: the component can't be changed. Error code is ErrorCodes.COMPONENT_INITIALISED
java.lang.IllegalArgumentException - if the parameter is null, the message is obtained via MsgHelper.formatNullParamter(java.lang.String, java.lang.Class)
java.lang.InternalError - if the property pParamName hasn't been defined.

load

public void load()
          throws LoadableException
Invoked by the service manager to start this component once it has been configured. When extended bare in mind that the member variable mIsLoaded should be set to false and then set to true once all the init code has been performed.

Specified by:
load in interface ILoadable
Overrides:
load in class AbsComponentManager
Throws:
LoadableException - if this component isn't initialisable or is already running.

unload

public void unload()
            throws LoadableException
Invoked by the service manager to stop this component. When extended bare in mind that the member variable mIsLoaded should be set to true and then set to false once all the init code has been performed.

Specified by:
unload in interface ILoadable
Overrides:
unload in class AbsComponentManager
Throws:
LoadableException - if the composant isn't running or if it isn't an initialisable component.

getPublisher

public IPublisher getPublisher(java.lang.String pPublisherName)
                        throws RaccoonException
Retrieves a specific publisher based upon it's logical name.

Specified by:
getPublisher in interface INucleus
Parameters:
pPublisherName - the logical name of the publisher.
Returns:
the publisher instance
Throws:
RaccoonException - if anything goes wrong.
Since:
Raccoon v0.2, refactored in Raccoon v0.5

getSubscriber

public ISubscriber getSubscriber(java.lang.String pSubscriberName)
                          throws RaccoonException
Retrieves a specific subscriber based upon it's logical name.

Specified by:
getSubscriber in interface INucleus
Parameters:
pSubscriberName - the logical name of the subscriber.
Returns:
the subscriber instance
Throws:
RaccoonException - if anything goes wrong.
Since:
Raccoon v0.2, refactored in Raccoon v0.5

loadComponent

protected IBaseComponent loadComponent(java.lang.String pComponentName)
                                throws RaccoonException
Generates a new instance of ComponentBase, must be implemented by inheriting classes.

Specified by:
loadComponent in class AbsComponentManager
Parameters:
pComponentName - the desired component instance.
Returns:
the new component instance.
Throws:
RaccoonException - if the instanciation failed.

getConfig

public IConfig getConfig()

setConfig

public void setConfig(IConfig pConfig)
               throws ResourceNotFoundException
Throws:
ResourceNotFoundException

getDescription

public java.lang.String getDescription()
The description of this Nucleus and the underlying transport.

Returns:
the description.

setDescription

public void setDescription(java.lang.String pDescription)
Defines the description of this nucleus.

Parameters:
pDescription - the description string.


Copyright null null. All Rights Reserved.