Class Connector

java.lang.Object
org.jpos.iso.Connector
All Implemented Interfaces:
Configurable, ISORequestListener, LogSource

public class Connector extends Object implements ISORequestListener, LogSource, Configurable
Connector implements ISORequestListener and forward all incoming messages to a given destination MUX, or Channel handling back responses
See Also:
  • Field Details

    • muxName

      protected String muxName
      Name of the QMUX to look up.
    • channelName

      protected String channelName
      Name of the channel to look up.
    • timeout

      protected int timeout
      Response timeout in milliseconds (0 = no timeout).
    • pool

      protected static ThreadPool pool
      Shared thread pool for processing incoming messages.
  • Constructor Details

    • Connector

      public Connector()
      Default constructor.
  • Method Details

    • setLogger

      public void setLogger(Logger logger, String realm)
      Description copied from interface: LogSource
      Attaches a Logger and realm to this log source.
      Specified by:
      setLogger in interface LogSource
      Parameters:
      logger - the logger to use
      realm - the log realm (diagnostic label)
    • getRealm

      public String getRealm()
      Description copied from interface: LogSource
      Returns the log realm associated with this source.
      Specified by:
      getRealm in interface LogSource
      Returns:
      log realm
    • getLogger

      public Logger getLogger()
      Description copied from interface: LogSource
      Returns the Logger associated with this source.
      Specified by:
      getLogger in interface LogSource
      Returns:
      the Logger
    • setConfiguration

      Destination can be a Channel or a MUX. If Destination is a Channel then timeout applies (used on ISORequest to get a Response).
      • destination-mux
      • destination-channel
      • timeout
      • poolsize
      Specified by:
      setConfiguration in interface Configurable
      Parameters:
      cfg - Configuration
      Throws:
      ConfigurationException - if the configuration is invalid
    • process

      public boolean process(ISOSource source, ISOMsg m)
      Description copied from interface: ISORequestListener
      Called when an unmatched request is received. Processes an unmatched ISO request.
      Specified by:
      process in interface ISORequestListener
      Parameters:
      source - source where you optionally can reply
      m - the unmatched request
      Returns:
      true if request was handled by this listener