|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object raccoon.core.types.AbsComponent raccoon.core.types.AbsLoadable raccoon.core.types.AbsConfigurableLoadable raccoon.tibco.tibrv.endpoint.TibrvSubscriber
public class TibrvSubscriber
The implementation of ISubscriber
over TIB/Rendezvous.
Field Summary |
---|
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 | |
---|---|
TibrvSubscriber()
Default constructor, required for dynamic instanciation. |
Method Summary | |
---|---|
void |
addEventHandler(IEventHandler pNewHandler)
Adds an Event Handler to this subscriber. |
void |
configureParameters()
Configures the various parameters for this component. |
IPublisher |
getErrorPublisher()
Extracts the publisher used for publising internal errors. |
java.lang.String |
getEventSubject()
The subject/topic to which this instance is subscribed to. |
java.lang.Object |
getNativeSub()
Returns the embedded subscriber. |
long |
getNbMsgReceived()
The number of messages received by this subscriber since it has been started |
java.lang.String |
getSubject()
The subject to which this subscriber is listening to. |
com.tibco.tibrv.TibrvQueue |
getTibrvQueue()
The queue which contains the messages of this subscriber. |
com.tibco.tibrv.TibrvTransport |
getTransport()
The TIB/Rendezvous transport used by this subscriber. |
void |
load()
Initializes dependant TIB/Rendezvous components. |
void |
removeEventHandler(java.lang.String pHandlerName)
Removes an EventHandler from this subscriber. |
void |
setErrorPublisher(IPublisher pErrorPublisher)
Defines the error publisher to be used by this instance. |
void |
setNativeSub(java.lang.Object pSubscriber)
Assigns the native subscriber to this element |
void |
setSubject(java.lang.String pSubject)
Defines the TIB/Rendezvous subject for this subscriber. |
void |
setTibrvQueue(com.tibco.tibrv.TibrvQueue pTibrvQueue)
Defines the queue that will contain the incoming events. |
void |
setTransport(com.tibco.tibrv.TibrvTransport pTransport)
Defines the transport used by this subscriber. |
void |
unload()
Invoked by the service manager to stop this component. |
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 |
Constructor Detail |
---|
public TibrvSubscriber()
Method Detail |
---|
public void configureParameters()
IConfigurableManager
provided during
the invocation of AbsConfigurableLoadable.setConfigurableManager(raccoon.api.types.IConfigurableManager)
.
configureParameters
in interface IConfigurable
configureParameters
in class AbsConfigurableLoadable
public void load() throws LoadableException
load
in interface ILoadable
load
in class AbsConfigurableLoadable
LoadableException
- if this component is unable to correctly start TIB components.public void unload() throws LoadableException
true
and then set to false
once all the init code has been performed.
unload
in interface ILoadable
unload
in class AbsLoadable
LoadableException
- if the composant isn't running or if it isn't an initialisable component.public long getNbMsgReceived()
getNbMsgReceived
in interface ISubscriber
public com.tibco.tibrv.TibrvTransport getTransport()
public void setTransport(com.tibco.tibrv.TibrvTransport pTransport) throws RaccoonException, java.lang.IllegalArgumentException
pTransport
- the native transport to use.
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)
public java.lang.String getEventSubject()
getEventSubject
in interface ISubscriber
getSubject()
public java.lang.String getSubject()
public void setSubject(java.lang.String pSubject) throws RaccoonException, java.lang.IllegalArgumentException
pSubject
- the TIB/Rendezvous subject
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)
public com.tibco.tibrv.TibrvQueue getTibrvQueue()
public void setTibrvQueue(com.tibco.tibrv.TibrvQueue pTibrvQueue) throws RaccoonException, java.lang.IllegalArgumentException
pTibrvQueue
- the TIB/Rendezvous queue.
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)
public void addEventHandler(IEventHandler pNewHandler) throws RaccoonException
addEventHandler
in interface ISubscriber
pNewHandler
- the new event handler
RaccoonException
- if the key of the Event Handler has already been
inserted into this subscriber.IEventHandler
public void removeEventHandler(java.lang.String pHandlerName) throws RaccoonException
removeEventHandler
in interface ISubscriber
pHandlerName
- the logical name of the handler
RaccoonException
- if the handler couldn't be found.public java.lang.Object getNativeSub()
getNativeSub
in interface ISubscriber
public void setNativeSub(java.lang.Object pSubscriber) throws RaccoonException, java.lang.IllegalArgumentException
setNativeSub
in interface ISubscriber
pSubscriber
- the native subscriber.
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)
public IPublisher getErrorPublisher()
getErrorPublisher
in interface ISubscriber
public void setErrorPublisher(IPublisher pErrorPublisher) throws RaccoonException, java.lang.IllegalArgumentException, java.lang.InternalError
setErrorPublisher
in interface ISubscriber
pErrorPublisher
- the error publisher instance
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |