@Category(value="Basic") public class IbisLocalSender extends SenderWithParametersBase implements HasPhysicalDestination, IThreadCreator
exit
>
that has state PipeLine.ExitState.ERROR
, an error is considered to happen
in the caller which means that the exception
forward is followed if it is present.
Returns exit.code as forward name to SenderPipe provided that exit.code can be parsed as integer.
For example, if the called adapter has an exit state with code
2
, then the SenderPipe
supports a forward with name 2
that is followed when the called adapter exits with the mentioned exit. This does not work if the code is for example c2
.
An IbisLocalSender makes a call to a Receiver with either a WebServiceListener
or a JavaListener
.
JavaListener
. If,
however, a Receiver with a WebServiceListener
is already present, that can be used in some cases, too.
javaListener
to yourServiceNameserviceName
name
to yourServiceNameserviceName
, except if the service is to be called also
from applications other than this IBIS-instanceserviceName
to yourIbisWebServiceNamejavaListener
name
to yourIbisWebServiceNameModifier and Type | Field and Description |
---|---|
protected ThreadLifeCycleEventListener<Object> |
threadLifeCycleEventListener |
parameterNamesMustBeUnique, paramList
log
Constructor and Description |
---|
IbisLocalSender() |
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() |
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).
|
void |
setCheckDependency(boolean b)
If
true , the sender waits upon open until the called JavaListener is opened |
void |
setDependencyTimeOut(int i)
Maximum time (in seconds) the sender waits for the listener to start.
|
void |
setIsolated(boolean b)
If
true , the call is made in a separate thread, possibly using separate transaction |
void |
setJavaListener(String string)
Name of the
JavaListener that should be called (will be ignored when javaListenerSessionKey is set) |
void |
setJavaListenerSessionKey(String string)
Name of the sessionKey which holds the name of the
JavaListener that should be called |
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 serviceName)
Deprecated.
|
void |
setSynchronous(boolean b)
If set
false , the call is made asynchronously. |
void |
setThrowJavaListenerNotFoundException(boolean b)
If set
false , the xml-string \"<error>could not find JavaListener [...]</error>\" is returned instead of throwing a senderexception |
addParameter, checkStringAttributeOrParameter, consumesSessionVariable, getParameterList, getParameterOverriddenAttributeValue, getParameterOverriddenAttributeValue, getParameterValueList
close, createBean, getLogPrefix, getName, setApplicationContext, setName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDomain
setThreadLifeCycleEventListener
close, isSynchronous, sendMessageOrThrow
getName, setName
getApplicationContext, getName
getConfigurationClassLoader
protected ThreadLifeCycleEventListener<Object> threadLifeCycleEventListener
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 void open() throws SenderException
ISender
sendMessage()
method.open
in interface ISender
open
in class SenderBase
SenderException
public String getPhysicalDestinationName()
getPhysicalDestinationName
in interface HasPhysicalDestination
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
@Deprecated public void setServiceName(String serviceName)
WebServiceListener
that should be calledpublic void setJavaListener(String string)
JavaListener
that should be called (will be ignored when javaListenerSessionKey is set)public void setJavaListenerSessionKey(String string)
JavaListener
that should be calledpublic void setReturnedSessionKeys(String string)
public void setSynchronous(boolean b)
false
, the call is made asynchronously. This implies isolated=true
public void setIsolated(boolean b)
true
, the call is made in a separate thread, possibly using separate transactionpublic void setCheckDependency(boolean b)
true
, the sender waits upon open until the called JavaListener
is openedpublic void setDependencyTimeOut(int i)
public void setThrowJavaListenerNotFoundException(boolean b)
false
, the xml-string \"<error>could not find JavaListener [...]</error>\" is returned instead of throwing a senderexceptionCopyright © 2023 Frank!Framework. All rights reserved.