Class PADChannel

All Implemented Interfaces:
Cloneable, Configurable, ExceptionHandlerAware, BaseChannelMBean, ClientChannel, FactoryChannel, FilteredChannel, ISOChannel, ISOSource, ServerChannel, ISOMsgMetrics.Source, LogSource

public class PADChannel extends BaseChannel
Implements an ISOChannel suitable to be used to connect to an X.25 PAD.
See Also:
  • Constructor Details

  • Method Details

    • receive

      Description copied from class: BaseChannel
      Waits and receive an ISOMsg over the TCP/IP session
      Specified by:
      receive in interface ISOChannel
      Overrides:
      receive in class BaseChannel
      Returns:
      the Message received
      Throws:
      IOException - on I/O error
      ISOException - on ISO processing error
    • send

      public void send(ISOMsg m) throws IOException, ISOException
      Description copied from class: BaseChannel
      Sends the specified ISOMsg over this ISOChannel.

      This method performs the following steps:

      • Verifies the channel is connected.
      • Sets the message direction to ISOMsg.OUTGOING.
      • Retrieves and sets a dynamic packager for the message.
      • Applies all registered outgoing filters, allowing them to modify or veto the message.
      • Packs the message and writes its length, header, body, and trailer to the underlying stream, protected by a locking mechanism to ensure thread safety.
      • Flushes the output stream and increments message counters.
      • Notifies observers of the sent message.
      • Logs both the message and the send operation through ChannelEvent and LogEvent.
      If a ISOFilter.VetoException is thrown by a filter, the message is not sent, and the exception is logged.
      Specified by:
      send in interface ISOChannel
      Specified by:
      send in interface ISOSource
      Overrides:
      send in class BaseChannel
      Parameters:
      m - the ISO message to be sent. The message will be modified in-place: its direction and packager will be updated, and filters may alter its content.
      Throws:
      IOException - if the channel is not connected, if the output stream fails, if locking times out, or if an unexpected I/O error occurs.
      ISOException - if packing the message fails or other ISO-specific issues occur.
      See Also:
    • setConfiguration

      Description copied from class: BaseChannel
      Implements Configurable
      Properties:
      • host - destination host (if ClientChannel)
      • port - port number (if ClientChannel)
      • local-iface - local interfase to use (if ClientChannel)
      • local-port - local port to bind (if ClientChannel)
      (host not present indicates a ServerChannel)
      Specified by:
      setConfiguration in interface Configurable
      Overrides:
      setConfiguration in class BaseChannel
      Parameters:
      cfg - Configuration
      Throws:
      ConfigurationException - if configuration is invalid
    • setHeader

      public void setHeader(String header)
      Description copied from class: BaseChannel
      Sets the message header from a hex string.
      Overrides:
      setHeader in class BaseChannel
      Parameters:
      header - Hex representation of header