public class IfsaRequesterSender extends IfsaFacade implements ISenderWithParameters, HasStatistics
sender
that sends a message to an IFSA service and, in case the MessageProtocol is RR (Request-Reply)
it waits for an reply-message.HasStatistics.Action
Modifier and Type | Field and Description |
---|---|
protected String |
bifNameSessionKey |
protected ParameterList |
paramList |
log
Constructor and Description |
---|
IfsaRequesterSender() |
Modifier and Type | Method and Description |
---|---|
void |
addParameter(Parameter p) |
void |
close()
Stop the sender and deallocate resources.
|
void |
configure()
Checks if messageProtocol and serviceId (only for Requestors) are specified
|
String |
getBifNameSessionKey() |
ParameterList |
getParameterList() |
boolean |
isSynchronous()
returns true for Request/Reply configurations
|
boolean |
isThrowExceptions() |
void |
iterateOverStatistics(StatisticsKeeperIterationHandler hski,
Object data,
HasStatistics.Action action) |
void |
open()
This method will be called to start the sender.
|
SenderResult |
sendMessage(Message message,
PipeLineSession session)
Send a message to some destination (as configured in the Sender object).
|
String |
sendMessage(String message,
Map<String,String> params,
String bifName,
byte[] btcData)
Execute a request to the IFSA service.
|
String |
sendMessage(String dummyCorrelationId,
String message,
Map<String,String> params) |
void |
setBifNameSessionKey(String bifnameSessionKey) |
void |
setThrowExceptions(boolean b) |
String |
toString() |
cleanUpAfterException, closeReplyReceiver, closeService, closeSession, createSender, createSession, getAckMode, getApplicationId, getExpiry, getExpiry, getLogPrefix, getMessageProtocol, getMessageProtocolEnum, getMessagingSource, getName, getPhysicalDestinationName, getProviderSelector, getReplyReceiver, getServiceId, getServiceQueue, getServiceReceiver, getTimeOut, isJmsTransacted, isProvider, isRequestor, isSessionsArePooled, openService, sendMessage, sendReply, setAckMode, setAcknowledgeMode, setApplicationId, setMessageProtocol, setName, setServiceId, setTimeOut, useSelectorsForProviders
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
consumesSessionVariable
sendMessageOrThrow
getName, setName
getApplicationContext, getName
getConfigurationClassLoader
setApplicationContext
getDomain
protected String bifNameSessionKey
protected ParameterList paramList
public void configure() throws ConfigurationException
IfsaFacade
configure
in interface IConfigurable
configure
in interface ISender
configure
in class IfsaFacade
ConfigurationException
public void open() throws SenderException
ISender
sendMessage()
method.open
in interface ISender
SenderException
public void close() throws SenderException
close
in interface ISender
SenderException
public boolean isSynchronous()
isSynchronous
in interface ISender
public SenderResult sendMessage(Message message, PipeLineSession session) throws SenderException, TimeoutException
ISender
configure()
method is called.
The following table shows the difference between synchronous and a-synchronous senders:
synchronous | a-synchronous | |
---|---|---|
ISender.isSynchronous() returns | true | false |
return value of sendMessage() is | the reply-message | the messageId of the message sent |
the correlationID specified with sendMessage() | may be ignored | is sent with the message |
a {link TimeOutException} | may be thrown if a timeout occurs waiting for a reply | should not be expected |
Multiple objects may try to call this method at the same time, from different threads.
Implementations of this method should therefore be thread-safe, or synchronized
.
sendMessage
in interface ISender
SenderException
TimeoutException
public String sendMessage(String dummyCorrelationId, String message, Map<String,String> params) throws SenderException, TimeoutException
SenderException
TimeoutException
public String sendMessage(String message, Map<String,String> params, String bifName, byte[] btcData) throws SenderException, TimeoutException
SenderException
TimeoutException
public void iterateOverStatistics(StatisticsKeeperIterationHandler hski, Object data, HasStatistics.Action action) throws SenderException
iterateOverStatistics
in interface HasStatistics
SenderException
public String toString()
toString
in class IfsaFacade
public void addParameter(Parameter p)
addParameter
in interface IWithParameters
public ParameterList getParameterList()
getParameterList
in interface IWithParameters
public void setThrowExceptions(boolean b)
public boolean isThrowExceptions()
public void setBifNameSessionKey(String bifnameSessionKey)
public String getBifNameSessionKey()
Copyright © 2023 Frank!Framework. All rights reserved.