org.jpos.q2.iso
Class ChannelAdaptor
java.lang.Object
org.jpos.q2.QBeanSupport
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: 2594 $ $Date: 2008-01-22 08:41:31 -0800 (Tue, 22 Jan 2008) $
- Author:
- Alejandro Revilla
| Methods inherited from class org.jpos.q2.QBeanSupport |
destroy, getConfiguration, getFactory, getLoader, getLoaderURLS, getLog, getLogger, getName, getPersist, getServer, getState, getStateAsString, init, isModified, running, setConfiguration, setLogger, setModified, setName, setPersist, setServer, setState, shutdownQ2, start, stop |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChannelAdaptor
public ChannelAdaptor()
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 sendtimeout -
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
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