Class IbisJavaSender

All Implemented Interfaces:
HasPhysicalDestination, IConfigurable, IConfigurationAware, INamedObject, IScopeProvider, ISender, ISenderWithParameters, IWithParameters, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

@Forward(name="*", description="Exit code") @Category("Advanced") public class IbisJavaSender extends SenderWithParametersBase implements HasPhysicalDestination
Posts a message to another Frank!Framework-adapter or an application in the same JVM using IbisServiceDispatcher.

An IbisJavaSender makes a call to a Receiver with a JavaListener or any other application in the same JVM that has registered a RequestProcessor with the IbisServiceDispatcher.

The IbisJavaSender is now considered to be legacy. The new way to call another adapter or java application from your own adapter is by using the FrankSender.

configuring IbisJavaSender and JavaListener

  • NB: Using IbisJavaSender to call another adapter is inefficient and therefore not recommended. It is much more efficient to use for this a FrankSender or IbisLocalSender.
  • Define a SenderPipe with an IbisJavaSender
  • Set the attribute serviceName to yourExternalServiceName
In the Adapter to be called:
  • Define a Receiver with a JavaListener
  • Set the attribute serviceName to yourExternalServiceName
N.B. Please make sure that the IbisServiceDispatcher-1.4.jar or newer is present on the class path of the server. For more information, see: https://github.com/frankframework/servicedispatcher
Since:
4.4.5
Author:
Gerrit van Brakel
Parameters
All parameters are copied to the PipeLineSession of the service called.
  • Constructor Details

    • IbisJavaSender

      public IbisJavaSender()
  • Method Details

    • configure

      public void configure() throws ConfigurationException
      Description copied from interface: 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.
      Specified by:
      configure in interface IConfigurable
      Specified by:
      configure in interface ISender
      Overrides:
      configure in class SenderWithParametersBase
      Throws:
      ConfigurationException
    • getPhysicalDestinationName

      public String getPhysicalDestinationName()
      Specified by:
      getPhysicalDestinationName in interface HasPhysicalDestination
    • isSynchronous

      public boolean isSynchronous()
      Description copied from interface: ISender
      When true, the result of sendMessage is the reply of the request.
      Specified by:
      isSynchronous in interface ISender
    • sendMessage

      @Nonnull public SenderResult sendMessage(@Nonnull Message message, @Nonnull PipeLineSession session) throws SenderException, TimeoutException
      Description copied from interface: ISender
      Send a message to some destination (as configured in the Sender object). This method may only be called after the configure() method is called.

      The following table shows the difference between synchronous and a-synchronous senders:

       synchronousa-synchronous
      ISender.isSynchronous() returnstruefalse
      return value of sendMessage() isthe reply-messagethe messageId of the message sent
      the correlationID specified with sendMessage()may be ignoredis sent with the message
      a {link TimeOutException}may be thrown if a timeout occurs waiting for a replyshould 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.

      Specified by:
      sendMessage in interface ISender
      Throws:
      SenderException
      TimeoutException
    • setServiceName

      public void setServiceName(String string)
      ServiceName of the JavaListener that should be called.
    • setServiceNameSessionKey

      public void setServiceNameSessionKey(String string)
      Key of session variable to specify ServiceName of the JavaListener that should be called.
    • setReturnedSessionKeys

      public 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. The set of available sessionKeys to be returned might be limited by the returnedSessionKeys attribute of the corresponding JavaListener.
    • setDispatchType

      public void setDispatchType(String type) throws ConfigurationException
      Set to 'DLL' to make the dispatcher communicate with a DLL set on the classpath
      Throws:
      ConfigurationException
    • getDomain

      public String getDomain()
      Specified by:
      getDomain in interface HasPhysicalDestination
    • getServiceName

      public String getServiceName()
    • getServiceNameSessionKey

      public String getServiceNameSessionKey()
    • getReturnedSessionKeys

      public String getReturnedSessionKeys()
    • getDispatchType

      public String getDispatchType()