org.osesb.msgrouting.test.deployabletestpackage2
Class CreditRatingSOAPClientPipelineStage
java.lang.Object
org.osesb.messagepipeline.PipelineStage
org.osesb.messagepipeline.builtinstages.SOAPPipelineStage
org.osesb.messagepipeline.builtinstages.SOAPClientPipelineStage_2
org.osesb.msgrouting.test.deployabletestpackage2.CreditRatingSOAPClientPipelineStage
public class CreditRatingSOAPClientPipelineStage
- extends SOAPClientPipelineStage_2
CreditRatingSOAPClientPipelineStage extends SOAPClientPipelineStage_2 and invokes
the creditRating service, which is implemented
by org.osesb.transporthandlers.test.deployabletestpackage2.soaptransporthandler.ejb20.ProcessLoanApplicationBusinessServiceBean
in the transport-handlers module. The creditRating service returns a new credit rating
for a customer.
CreditRatingSOAPClientPipelineStage extends SOAPClientPipelineStage_2 in order
to put the new customer credit rating on the MessagePipelineContext for a subsequent
XMLUpdaterPipelineStage that updates the loanApplicationXMLMessage.
The service method signature is: public int getCreditRating() throws Exception;
getCreditRating() generates a random number between 0 and 5 for the credit rating.
If the random credit rating is 0, then getCreditRating() throws an Exception
indicating that the getCreditRating() service could not determine a credit rating.
|
Method Summary |
static void |
main(java.lang.String[] args)
main() For testing and sandboxing. |
boolean |
runStage(EAIMessage eaiMessage)
Run PipelineStage logic. |
| Methods inherited from class org.osesb.messagepipeline.PipelineStage |
getMessagePipelineContext, getNextStage, getParentMessagePipeline, getPipelineStageConfiguration, getPreviousStage, handlePipelineException, handlePipelineException, logMessage, propagate, setNextStage, setOutputMessage, setPreviousStage, setResultMessage |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CreditRatingSOAPClientPipelineStage
public CreditRatingSOAPClientPipelineStage(MessagePipeline parentMessagePipeline,
PipelineStageConfiguration pipelineStageConfiguration)
throws java.lang.Exception
- Creates a new instance of CreditRatingSOAPClientPipelineStage.
- 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.
runStage
public boolean runStage(EAIMessage eaiMessage)
throws PipelineStageException
- Run PipelineStage logic.
runStage() does not use or modify the current MessagePipline message.
- Invoke the creditRating service, which is implemented
by org.osesb.transporthandlers.test.deployabletestpackage2.soaptransporthandler.ejb20.ProcessLoanApplicationBusinessServiceBean
in the transport-handlers module. The creditRating service returns a new credit rating
for a customer.
- Retrieve the new credit rating from the MessagePipelineContext.
- Set a MessagePipelineContext variable for a subsequent XMLUpdaterPipelineStage named
'AddCreditRatingElementPipelineStage' that updates the loanApplicationXMLMessage.
- Overrides:
runStage in class SOAPClientPipelineStage_2
- 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
main
public static void main(java.lang.String[] args)
- main() For testing and sandboxing.
- Parameters:
args - commandline arguments