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
- Direct Known Subclasses:
- MultiSessionChannelAdaptor
public class ChannelAdaptor
- extends QBeanSupport
- implements ChannelAdaptorMBean, Channel, Loggeable
- Author:
- Alejandro Revilla
| Methods inherited from class org.jpos.q2.QBeanSupport |
addAttr, createElement, destroy, getAttrs, getAttrs, getConfiguration, getFactory, getLoader, getLoaderURLS, getLog, getLogger, getName, getPersist, getProperties, getProperty, getRealm, getServer, getState, getStateAsString, init, isModified, running, setAttr, setConfiguration, setLogger, setModified, setName, setPersist, setProperty, setRealm, setServer, setState, shutdownQ2, start, stop |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, 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 |
ChannelAdaptor
public ChannelAdaptor()
initService
public void initService()
throws ConfigurationException
- Overrides:
initService in class QBeanSupport
- Throws:
ConfigurationException
startService
public void startService()
- Overrides:
startService in class QBeanSupport
stopService
public void stopService()
- Overrides:
stopService in class QBeanSupport
destroyService
public void destroyService()
- Overrides:
destroyService in class QBeanSupport
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(String in)
- Specified by:
setInQueue in interface ChannelAdaptorMBean
getInQueue
public String getInQueue()
- Specified by:
getInQueue in interface ChannelAdaptorMBean
setOutQueue
public void setOutQueue(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 String getOutQueue()
- Specified by:
getOutQueue in interface ChannelAdaptorMBean
newChannel
public ISOChannel newChannel(org.jdom.Element e,
QFactory f)
throws ConfigurationException
- Throws:
ConfigurationException
addFilters
protected void addFilters(FilteredChannel channel,
org.jdom.Element e,
QFactory fact)
throws ConfigurationException
- Throws:
ConfigurationException
initChannel
protected ISOChannel initChannel()
throws ConfigurationException
- Throws:
ConfigurationException
initSpaceAndQueues
protected void initSpaceAndQueues()
throws ConfigurationException
- Throws:
ConfigurationException
checkConnection
protected void checkConnection()
disconnect
protected void disconnect()
setHost
public void setHost(String host)
- Specified by:
setHost in interface ChannelAdaptorMBean
getHost
public 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(String sFac)
- Specified by:
setSocketFactory in interface ChannelAdaptorMBean
resetCounters
public void resetCounters()
- Specified by:
resetCounters in interface ChannelAdaptorMBean
getCountersAsString
public 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 String getSocketFactory()
- Specified by:
getSocketFactory in interface ChannelAdaptorMBean
dump
public void dump(PrintStream p,
String indent)
- Specified by:
dump in interface Loggeable
grabSpace
protected Space grabSpace(org.jdom.Element e)
append
protected void append(StringBuffer sb,
String name,
int value)
Copyright © 1998-2012 jPOS.org. All Rights Reserved.