jPOS 1.6.1 API Documentation

org.jpos.iso.channel
Class VAPChannel

java.lang.Object
  extended by java.util.Observable
      extended by org.jpos.iso.BaseChannel
          extended by org.jpos.iso.channel.VAPChannel
All Implemented Interfaces:
java.lang.Cloneable, Configurable, ReConfigurable, BaseChannelMBean, ClientChannel, FactoryChannel, FilteredChannel, ISOChannel, ISOSource, ServerChannel, LogSource

public class VAPChannel
extends BaseChannel

ISOChannel implementation - VISA's VAP framing

Version:
$Id: VAPChannel.java 2594 2008-01-22 16:41:31Z apr $
Author:
apr@cs.com.uy
See Also:
ISOMsg, ISOException, ISOChannel

Field Summary
 
Fields inherited from interface org.jpos.iso.ISOChannel
CONNECT, RX, SIZEOF_CNT, TX
 
Constructor Summary
VAPChannel()
          Public constructor (used by Class.forName("...").newInstance())
VAPChannel(ISOPackager p)
          Construct server ISOChannel
VAPChannel(ISOPackager p, java.net.ServerSocket serverSocket)
          constructs a server ISOChannel associated with a Server Socket
VAPChannel(java.lang.String host, int port, ISOPackager p)
          Construct client ISOChannel
 
Method Summary
 void send(ISOMsg m)
          sends an ISOMsg over the TCP/IP session.
 void setConfiguration(Configuration cfg)
          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)
 
Methods inherited from class org.jpos.iso.BaseChannel
accept, addFilter, addFilter, addIncomingFilter, addOutgoingFilter, clone, connect, disconnect, getBytes, getChannel, getConfiguration, getCounters, getHeader, getHost, getIncomingFilters, getLogger, getMaxPacketLength, getName, getOriginalRealm, getOutgoingFilters, getPackager, getPort, getRealm, getServerSocket, getSocket, getSocketFactory, getTimeout, isConnected, isOverrideHeader, receive, reconnect, removeFilter, removeFilter, removeIncomingFilter, removeOutgoingFilter, resetCounters, sendKeepAlive, setHeader, setHeader, setHost, setHost, setIncomingFilters, setLocalAddress, setLogger, setMaxPacketLength, setName, setOutgoingFilters, setOverrideHeader, setPackager, setPort, setServerSocket, setSocketFactory, setTimeout, setUsable
 
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VAPChannel

public VAPChannel()
Public constructor (used by Class.forName("...").newInstance())


VAPChannel

public VAPChannel(java.lang.String host,
                  int port,
                  ISOPackager p)
Construct client ISOChannel

Parameters:
host - server TCP Address
port - server port number
p - an ISOPackager (should be ISO87BPackager)
See Also:
ISO87BPackager

VAPChannel

public VAPChannel(ISOPackager p)
           throws java.io.IOException
Construct server ISOChannel

Parameters:
p - an ISOPackager (should be ISO87BPackager)
Throws:
java.io.IOException
See Also:
ISO87BPackager

VAPChannel

public VAPChannel(ISOPackager p,
                  java.net.ServerSocket serverSocket)
           throws java.io.IOException
constructs a server ISOChannel associated with a Server Socket

Parameters:
p - an ISOPackager
serverSocket - where to accept a connection
Throws:
java.io.IOException
See Also:
ISOPackager
Method Detail

send

public void send(ISOMsg m)
          throws java.io.IOException,
                 ISOException
sends an ISOMsg over the TCP/IP session. swap source/destination addresses in BASE1Header if a reply message is detected.
Sending an incoming message is seen as a reply.

Specified by:
send in interface ISOChannel
Specified by:
send in interface ISOSource
Overrides:
send in class BaseChannel
Parameters:
m - the Message to be sent
Throws:
java.io.IOException
ISOException
See Also:
ISOChannel.send(org.jpos.iso.ISOMsg)

setConfiguration

public void setConfiguration(Configuration cfg)
                      throws ConfigurationException
Description copied from class: BaseChannel
Implements Configurable
Properties:
(host not present indicates a ServerChannel)

Specified by:
setConfiguration in interface Configurable
Overrides:
setConfiguration in class BaseChannel
Parameters:
cfg - Configuration
Throws:
ConfigurationException

jPOS.org