jPOS 1.6.7 API Documentation

org.jpos.q2.iso
Class ChannelAdaptor

java.lang.Object
  extended by org.jpos.q2.QBeanSupport
      extended by org.jpos.q2.iso.ChannelAdaptor
All Implemented Interfaces:
Configurable, Channel, ChannelAdaptorMBean, QBean, QBeanSupportMBean, QPersist, Loggeable

public class ChannelAdaptor
extends QBeanSupport
implements ChannelAdaptorMBean, Channel, Loggeable

Version:
$Revision: 2854 $ $Date: 2010-01-02 02:34:31 -0800 (Sat, 02 Jan 2010) $
Author:
Alejandro Revilla

Nested Class Summary
 class ChannelAdaptor.Receiver
           
 class ChannelAdaptor.Sender
           
 
Field Summary
 
Fields inherited from interface org.jpos.q2.QBean
DESTROYED, FAILED, STARTED, STARTING, stateString, STOPPED, STOPPING
 
Constructor Summary
ChannelAdaptor()
           
 
Method Summary
 void destroyService()
           
 void dump(java.io.PrintStream p, java.lang.String indent)
           
 int getConnectsCounter()
           
 java.lang.String getCountersAsString()
           
 java.lang.String getHost()
           
 long getIdleTimeInMillis()
           
 java.lang.String getInQueue()
           
 long getLastTxnTimestampInMillis()
           
 java.lang.String getOutQueue()
           
 int getPort()
           
 long getReconnectDelay()
           
 int getRXCounter()
           
 java.lang.String getSocketFactory()
           
 int getTXCounter()
           
 void initChannel()
           
 boolean isConnected()
           
 ISOChannel newChannel(org.jdom.Element e, QFactory f)
           
 ISOMsg receive()
          Receive message
 ISOMsg receive(long timeout)
          Receive message
 void resetCounters()
           
 void send(ISOMsg m)
          Queue a message to be transmitted by this adaptor
 void send(ISOMsg m, long timeout)
          Queue a message to be transmitted by this adaptor
 void setHost(java.lang.String host)
           
 void setInQueue(java.lang.String in)
           
 void setOutQueue(java.lang.String out)
           
 void setPort(int port)
           
 void setReconnectDelay(long delay)
           
 void setSocketFactory(java.lang.String sFac)
           
 void startService()
           
 void stopService()
           
 
Methods inherited from class org.jpos.q2.QBeanSupport
destroy, getConfiguration, getFactory, getLoader, getLoaderURLS, getLog, getLogger, getName, getPersist, getRealm, getServer, getState, getStateAsString, init, isModified, running, setConfiguration, setLogger, setModified, setName, setPersist, setRealm, setServer, setState, shutdownQ2, start, stop
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jpos.q2.QBeanSupportMBean
getLoader, getLoaderURLS, getLogger, getName, getRealm, getServer, setLogger, setName, setPersist, setRealm, setServer, shutdownQ2
 
Methods inherited from interface org.jpos.q2.QBean
destroy, getState, getStateAsString, init, start, stop
 
Methods inherited from interface org.jpos.q2.QPersist
getPersist, isModified
 

Constructor Detail

ChannelAdaptor

public ChannelAdaptor()
Method Detail

initChannel

public void initChannel()
                 throws ConfigurationException
Throws:
ConfigurationException

startService

public void startService()

stopService

public void stopService()

destroyService

public void destroyService()

setReconnectDelay

public void setReconnectDelay(long delay)
Specified by:
setReconnectDelay in interface ChannelAdaptorMBean

getReconnectDelay

public long getReconnectDelay()
Specified by:
getReconnectDelay in interface ChannelAdaptorMBean

setInQueue

public void setInQueue(java.lang.String in)
Specified by:
setInQueue in interface ChannelAdaptorMBean

getInQueue

public java.lang.String getInQueue()
Specified by:
getInQueue in interface ChannelAdaptorMBean

setOutQueue

public void setOutQueue(java.lang.String out)
Specified by:
setOutQueue in interface ChannelAdaptorMBean

send

public void send(ISOMsg m)
Queue a message to be transmitted by this adaptor

Specified by:
send in interface Channel
Parameters:
m - message to send

send

public void send(ISOMsg m,
                 long timeout)
Queue a message to be transmitted by this adaptor

Parameters:
m - message to send
timeout -

receive

public ISOMsg receive()
Receive message

Specified by:
receive in interface Channel
Returns:
received message

receive

public ISOMsg receive(long timeout)
Receive message

Specified by:
receive in interface Channel
Parameters:
timeout - time to wait for an incoming message
Returns:
received message or null

isConnected

public boolean isConnected()
Specified by:
isConnected in interface ChannelAdaptorMBean
Returns:
true if channel is connected

getOutQueue

public java.lang.String getOutQueue()
Specified by:
getOutQueue in interface ChannelAdaptorMBean

newChannel

public ISOChannel newChannel(org.jdom.Element e,
                             QFactory f)
                      throws ConfigurationException
Throws:
ConfigurationException

setHost

public void setHost(java.lang.String host)
Specified by:
setHost in interface ChannelAdaptorMBean

getHost

public java.lang.String getHost()
Specified by:
getHost in interface ChannelAdaptorMBean

setPort

public void setPort(int port)
Specified by:
setPort in interface ChannelAdaptorMBean

getPort

public int getPort()
Specified by:
getPort in interface ChannelAdaptorMBean

setSocketFactory

public void setSocketFactory(java.lang.String sFac)
Specified by:
setSocketFactory in interface ChannelAdaptorMBean

resetCounters

public void resetCounters()
Specified by:
resetCounters in interface ChannelAdaptorMBean

getCountersAsString

public java.lang.String getCountersAsString()
Specified by:
getCountersAsString in interface ChannelAdaptorMBean

getTXCounter

public int getTXCounter()
Specified by:
getTXCounter in interface ChannelAdaptorMBean

getRXCounter

public int getRXCounter()
Specified by:
getRXCounter in interface ChannelAdaptorMBean

getConnectsCounter

public int getConnectsCounter()
Specified by:
getConnectsCounter in interface ChannelAdaptorMBean

getLastTxnTimestampInMillis

public long getLastTxnTimestampInMillis()
Specified by:
getLastTxnTimestampInMillis in interface ChannelAdaptorMBean

getIdleTimeInMillis

public long getIdleTimeInMillis()
Specified by:
getIdleTimeInMillis in interface ChannelAdaptorMBean

getSocketFactory

public java.lang.String getSocketFactory()
Specified by:
getSocketFactory in interface ChannelAdaptorMBean

dump

public void dump(java.io.PrintStream p,
                 java.lang.String indent)
Specified by:
dump in interface Loggeable

jPOS.org