@Category(value="Advanced") public class IbisJavaSender extends SenderWithParametersBase implements HasPhysicalDestination
JavaListener
or any other application in the same JVM that has registered a RequestProcessor
with the IbisServiceDispatcher.
serviceName
to yourExternalServiceNameserviceName
to yourExternalServiceNameparameterNamesMustBeUnique, paramList
log
Constructor and Description |
---|
IbisJavaSender() |
Modifier and Type | Method and Description |
---|---|
void |
configure()
configure() is called once at startup of the framework in the configure method of the owner of this sender. |
String |
getPhysicalDestinationName() |
boolean |
isSynchronous()
When
true , the result of sendMessage is the reply of the request. |
SenderResult |
sendMessage(Message message,
PipeLineSession session)
Send a message to some destination (as configured in the Sender object).
|
void |
setDispatchType(String type)
Set to 'DLL' to make the dispatcher communicate with a DLL set on the classpath
|
void |
setMultipartResponse(boolean b)
Currently used to mimic the HttpSender when it is stubbed locally.
|
void |
setReturnedSessionKeys(String string)
Comma separated list of keys of session variables that will be returned to caller, for correct results as well as for erroneous results.
|
void |
setServiceName(String string)
ServiceName of the
JavaListener that should be called. |
void |
setServiceNameSessionKey(String string)
Key of session variable to specify ServiceName of the JavaListener that should be called.
|
addParameter, checkStringAttributeOrParameter, consumesSessionVariable, getParameterList, getParameterOverriddenAttributeValue, getParameterOverriddenAttributeValue, getParameterValueList
close, createBean, getLogPrefix, getName, open, setApplicationContext, setName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDomain
close, open, sendMessageOrThrow
getName, setName
getApplicationContext, getName
getConfigurationClassLoader
public void configure() throws ConfigurationException
ISender
configure()
is called once at startup of the framework in the configure method of the owner of this sender.
Purpose of this method is to check whether the static configuration of the sender is correct.
As much as possible class-instantiating should take place in the configure()
or open()
method, to improve performance.configure
in interface IConfigurable
configure
in interface ISender
configure
in class SenderWithParametersBase
ConfigurationException
public String getPhysicalDestinationName()
getPhysicalDestinationName
in interface HasPhysicalDestination
public boolean isSynchronous()
ISender
true
, the result of sendMessage is the reply of the request.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 void setServiceName(String string)
JavaListener
that should be called.public void setServiceNameSessionKey(String string)
public void setReturnedSessionKeys(String string)
public void setMultipartResponse(boolean b)
public void setDispatchType(String type) throws ConfigurationException
ConfigurationException
Copyright © 2023 Frank!Framework. All rights reserved.