raccoon.tibco.tibrv.endpoint
Class TibrvPublisher

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

public class TibrvPublisher
extends AbsConfigurableLoadable
implements IPublisher

The implementation of the IPublisher interface for TIB/Rendezvous.

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

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
 
Fields inherited from interface raccoon.api.eai.endpoint.IPublisher
EVENT_SUBJECT, NATIVE_PUBLISHER
 
Constructor Summary
TibrvPublisher()
          Default constructor, required for dynamic instanciation
 
Method Summary
 void configureParameters()
          Configures the various parameters for this component.
 java.lang.String getEventSubject()
          Indicates the topic/subject on which the event will be fired.
 java.lang.Object getNativePub()
          Extracts the native publisher used.
 void send(java.lang.Object pJavaBeanToSend)
          Sends over the EAI infrastructure a java bean.
 void send(java.lang.Object pJavaBeanToSend, ITracking pTracking)
          Sends over the EAI infrastructure a java bean.
 void send(java.lang.String pSubject, java.lang.Object pJavaBeanToSend)
          Sends over the EAI infrastructure a java bean on a specific subject.
 void send(java.lang.String pSubject, java.lang.Object pJavaBeanToSend, ITracking pTracking)
          Sends over the EAI infrastructure a java bean.
 java.lang.Object sendRequest(java.lang.Object pRequest)
          Sends a request over the EAI infrastructure.
 void setEventSubject(java.lang.String pEventSubject)
          Defines the default publication subject.
 void setNativePub(java.lang.Object pPublisher)
          Assigns the native publisher to use.
 void unload()
          Unloads or deactivates the component.
 
Methods inherited from class raccoon.core.types.AbsConfigurableLoadable
isStable, load, 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

TibrvPublisher

public TibrvPublisher()
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(raccoon.api.types.IConfigurableManager).

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

setEventSubject

public void setEventSubject(java.lang.String pEventSubject)
                     throws RaccoonException,
                            java.lang.IllegalArgumentException
Defines the default publication subject.

Parameters:
pEventSubject - the subject on which messages will be sent if there is no assigned subject.
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)

getEventSubject

public java.lang.String getEventSubject()
Indicates the topic/subject on which the event will be fired.

Specified by:
getEventSubject in interface IPublisher
Returns:
the embbedded topic/subject used by default.

send

public void send(java.lang.Object pJavaBeanToSend)
          throws RaccoonException
Sends over the EAI infrastructure a java bean.

Specified by:
send in interface IPublisher
Parameters:
pJavaBeanToSend - the java bean to send.
Throws:
RaccoonException - if the java bean couldn't be sent.

send

public void send(java.lang.String pSubject,
                 java.lang.Object pJavaBeanToSend)
          throws RaccoonException
Sends over the EAI infrastructure a java bean on a specific subject.

Specified by:
send in interface IPublisher
Parameters:
pSubject - a MOM compliant subject/topic.
pJavaBeanToSend - the java bean to send over the MOM
Throws:
RaccoonException - if the message couldn't be sent over the MOM

send

public void send(java.lang.Object pJavaBeanToSend,
                 ITracking pTracking)
          throws RaccoonException
Sends over the EAI infrastructure a java bean.

Specified by:
send in interface IPublisher
Parameters:
pJavaBeanToSend - the java bean to send.
pTracking - the tracking information to attach to the given message
Throws:
RaccoonException - if the java bean couldn't be sent.

send

public void send(java.lang.String pSubject,
                 java.lang.Object pJavaBeanToSend,
                 ITracking pTracking)
          throws RaccoonException
Sends over the EAI infrastructure a java bean.

Specified by:
send in interface IPublisher
Parameters:
pSubject - a MOM compliant subject/topic.
pJavaBeanToSend - the java bean to send.
pTracking - the tracking information to attach to the given message
Throws:
RaccoonException - if the java bean couldn't be sent.

sendRequest

public java.lang.Object sendRequest(java.lang.Object pRequest)
                             throws RaccoonException
Sends a request over the EAI infrastructure.

Specified by:
sendRequest in interface IPublisher
Parameters:
pRequest - the java bean to send that represents the request.
Returns:
the reply in form of a java bean.
Throws:
RaccoonException - if something goes wrong

getNativePub

public java.lang.Object getNativePub()
Extracts the native publisher used.

Specified by:
getNativePub in interface IPublisher
Returns:
embedded publisher for a specific MOM.

setNativePub

public void setNativePub(java.lang.Object pPublisher)
                  throws RaccoonException,
                         java.lang.IllegalArgumentException
Assigns the native publisher to use.

Specified by:
setNativePub in interface IPublisher
Parameters:
pPublisher - the native publisher to use for a specific MOM.
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)

unload

public void unload()
            throws java.lang.IllegalStateException,
                   LoadableException
Unloads or deactivates the component. The invocation of this method should be used to clean up, if necessary, all used resources.

Specified by:
unload in interface ILoadable
Overrides:
unload in class AbsLoadable
Throws:
LoadableException - if the component couldn't unload itself.
java.lang.IllegalStateException - if this component isn't in a state to unload itself.


Copyright null null. All Rights Reserved.