jPOS 1.6.1 API Documentation

org.jpos.iso.channel
Class LoopbackChannel

java.lang.Object
  extended by java.util.Observable
      extended by org.jpos.iso.FilteredBase
          extended by org.jpos.iso.channel.LoopbackChannel
All Implemented Interfaces:
java.lang.Cloneable, FilteredChannel, ISOChannel, ISOSource, LogSource

public class LoopbackChannel
extends FilteredBase
implements LogSource


Field Summary
 
Fields inherited from interface org.jpos.iso.ISOChannel
CONNECT, RX, SIZEOF_CNT, TX
 
Constructor Summary
LoopbackChannel()
           
 
Method Summary
 void connect()
          Connects ISOChannel
 void disconnect()
          disconnects ISOChannel
 int[] getCounters()
           
 Logger getLogger()
           
 java.lang.String getName()
           
 ISOPackager getPackager()
           
 java.lang.String getRealm()
           
 boolean isConnected()
           
 ISOMsg receive()
          Receives an ISOMsg
 void reconnect()
          Reconnect channel
 void resetCounters()
           
 void send(ISOMsg m)
          sends an ISOMsg over the TCP/IP session
 void setLogger(Logger logger, java.lang.String realm)
           
 void setName(java.lang.String name)
          associates this ISOChannel with a name on NameRegistrar
 void setPackager(ISOPackager packager)
          setPackager is optional on LoopbackChannel, it is used for debugging/formating purposes only
 void setUsable(boolean usable)
           
 
Methods inherited from class org.jpos.iso.FilteredBase
addFilter, addIncomingFilter, addOutgoingFilter, clone, getIncomingFilters, getOutgoingFilters, removeFilter, removeIncomingFilter, removeOutgoingFilter, setIncomingFilters, setOutgoingFilters
 
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

LoopbackChannel

public LoopbackChannel()
Method Detail

setPackager

public void setPackager(ISOPackager packager)
setPackager is optional on LoopbackChannel, it is used for debugging/formating purposes only

Specified by:
setPackager in interface ISOChannel
Parameters:
packager - an ISOPackager

connect

public void connect()
Description copied from interface: ISOChannel
Connects ISOChannel

Specified by:
connect in interface ISOChannel

disconnect

public void disconnect()
disconnects ISOChannel

Specified by:
disconnect in interface ISOChannel

reconnect

public void reconnect()
Description copied from interface: ISOChannel
Reconnect channel

Specified by:
reconnect in interface ISOChannel

isConnected

public boolean isConnected()
Specified by:
isConnected in interface ISOChannel
Specified by:
isConnected in interface ISOSource
Returns:
true if Channel is connected and usable

send

public void send(ISOMsg m)
          throws java.io.IOException,
                 ISOException,
                 ISOFilter.VetoException
Description copied from interface: ISOChannel
sends an ISOMsg over the TCP/IP session

Specified by:
send in interface ISOChannel
Specified by:
send in interface ISOSource
Parameters:
m - the Message to be sent
Throws:
java.io.IOException
ISOException
ISOFilter.VetoException

receive

public ISOMsg receive()
               throws java.io.IOException,
                      ISOException
Description copied from interface: ISOChannel
Receives an ISOMsg

Specified by:
receive in interface ISOChannel
Returns:
the Message received
Throws:
java.io.IOException
ISOException

setUsable

public void setUsable(boolean usable)
Specified by:
setUsable in interface ISOChannel
Parameters:
usable - - usable state

getCounters

public int[] getCounters()

setName

public void setName(java.lang.String name)
Description copied from interface: ISOChannel
associates this ISOChannel with a name on NameRegistrar

Specified by:
setName in interface ISOChannel
Parameters:
name - name to register
See Also:
NameRegistrar

getName

public java.lang.String getName()
Specified by:
getName in interface ISOChannel
Returns:
this ISOChannel's name ("" if no name was set)

getPackager

public ISOPackager getPackager()
Specified by:
getPackager in interface ISOChannel
Returns:
current packager

resetCounters

public void resetCounters()

setLogger

public void setLogger(Logger logger,
                      java.lang.String realm)
Specified by:
setLogger in interface LogSource

getRealm

public java.lang.String getRealm()
Specified by:
getRealm in interface LogSource

getLogger

public Logger getLogger()
Specified by:
getLogger in interface LogSource

jPOS.org