org.osesb.msgrouting.test.deployabletestpackage1
Class TestBrokerAcknowledgementMessagePipelineStage

java.lang.Object
  extended by org.osesb.messagepipeline.PipelineStage
      extended by org.osesb.msgrouting.test.deployabletestpackage1.TestBrokerAcknowledgementMessagePipelineStage

public class TestBrokerAcknowledgementMessagePipelineStage
extends PipelineStage

The purpose of this PipelineStage is to test the correct receipt of a BrokerAcknowledgementMessage from a transport handler.

TestBrokerAcknowledgementMessagePipelineStage is configured by MessagePipelineConfiguration file, which can be found in /transport-handlers/deployabletestpackage1/transporthandler-config.

TestBrokerAcknowledgementMessagePipelineStage but cannot be exercised by a stand-alone test in MessagePipelineStageUnitTests. TestBrokerAcknowledgementMessagePipelineStage is deployed to a transport handler with a sendReply() method that returns a BrokerAcknowledgementMessage when a reply is expected but when the target MessagePipeline does not return a result.

TestBrokerAcknowledgementMessagePipelineStage has a runStage() method that does nothing and therefore does not return a result thereby enabling a test of an expected BrokerAcknowledgementMessage.


Field Summary
 
Fields inherited from class org.osesb.messagepipeline.PipelineStage
log, messagePipelineContext, nextStage, parentMessagePipeline, pipelineStageConfiguration, previousStage, thisClassName
 
Constructor Summary
TestBrokerAcknowledgementMessagePipelineStage(MessagePipeline parentMessagePipeline, PipelineStageConfiguration pipelineStageConfiguration)
          Creates a new instance of TestBrokerAcknowledgementMessagePipelineStage.
 
Method Summary
 boolean runStage(EAIMessage eaiMessage)
          Run PipelineStage logic.
 
Methods inherited from class org.osesb.messagepipeline.PipelineStage
beingDroppedFromPool, commit, getMessagePipelineContext, getNextStage, getParentMessagePipeline, getPipelineStageConfiguration, getPreviousStage, handlePipelineException, handlePipelineException, logMessage, propagate, rollback, setNextStage, setOutputMessage, setPreviousStage, setResultMessage, stageProcessingComplete, stageProcessingStarting
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestBrokerAcknowledgementMessagePipelineStage

public TestBrokerAcknowledgementMessagePipelineStage(MessagePipeline parentMessagePipeline,
                                                     PipelineStageConfiguration pipelineStageConfiguration)
                                              throws java.lang.Exception
Creates a new instance of TestBrokerAcknowledgementMessagePipelineStage.

Parameters:
parentMessagePipeline - The MessagePipeline that constructed this PipelineStage.
pipelineStageConfiguration - A PipelineStageConfiguration for this PipelineStage.
Throws:
java.lang.Exception - if constructed with a null parentMessagePipeline or a null pipelineStageConfiguration.
Method Detail

runStage

public boolean runStage(EAIMessage eaiMessage)
                 throws PipelineStageException
Run PipelineStage logic.

Overrides:
runStage in class PipelineStage
Parameters:
eaiMessage - The EAI message, which is the output of the last PipeLineStage that invoked setOutputMessage(), or, if this is the first PiplelineStage, then this is the EAIMessage that the MessagePipeline was invoked with.
Returns:
true to continue pipeline processing or false to terminate pipeline processing.
Throws:
a - PipelineStageException if any errors occur.
PipelineStageException