Class ChannelAdaptor
java.lang.Object
org.jpos.q2.QBeanSupport
org.jpos.q2.iso.ChannelAdaptor
- All Implemented Interfaces:
Configurable, ExceptionHandlerConfigAware, Channel, ChannelAdaptorMBean, QBean, QBeanSupportMBean, QPersist, Loggeable
- Direct Known Subclasses:
MultiSessionChannelAdaptor
public class ChannelAdaptor
extends QBeanSupport
implements ChannelAdaptorMBean, Channel, Loggeable, ExceptionHandlerConfigAware
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class QBeanSupport
cfg, log, scheduledThreadPoolExecutor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddFilters(FilteredChannel channel, org.jdom2.Element e, QFactory fact) protected voidappend(StringBuilder sb, String name, int value) protected voidvoidprotected voidvoiddump(PrintStream p, String indent) intgetHost()longlongintgetPort()longintintprotected SpacegrabSpace(org.jdom2.Element e) protected ISOChannelvoidprotected voidbooleannewChannel(org.jdom2.Element e, QFactory f) Parses a<channel>element, returning anISOChannelreceive()Receive messagereceive(long timeout) Receive messagevoidvoidQueue a message to be transmitted by this adaptorvoidQueue a message to be transmitted by this adaptorvoidvoidsetInQueue(String in) voidsetOutQueue(String out) voidsetPort(int port) voidsetReconnectDelay(long delay) voidsetSocketFactory(String sFac) voidvoidMethods inherited from class QBeanSupport
addAttr, close, createElement, destroy, getAttrs, getAttrs, getConfiguration, getDump, getFactory, getLoader, getLoaderURLS, getLog, getLogger, getName, getPersist, getProperties, getProperty, getRealm, getScheduledThreadPoolExecutor, getServer, getState, getStateAsString, init, isModified, running, setAttr, setConfiguration, setLogger, setModified, setName, setPersist, setProperty, setRealm, setServer, setState, start, stopMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ExceptionHandlerConfigAware
addExceptionHandlersMethods inherited from interface QBeanSupportMBean
getDump, getLoader, getLoaderURLS, getLogger, getName, getRealm, getServer, setLogger, setName, setPersist, setRealm, setServerMethods inherited from interface QPersist
getPersist, isModified
-
Field Details
-
sp
-
-
Constructor Details
-
ChannelAdaptor
public ChannelAdaptor()
-
-
Method Details
-
initService
- Overrides:
initServicein classQBeanSupport- Throws:
ConfigurationException
-
startService
- Overrides:
startServicein classQBeanSupport
-
stopService
- Overrides:
stopServicein classQBeanSupport
-
destroyService
- Overrides:
destroyServicein classQBeanSupport
-
setReconnectDelay
- Specified by:
setReconnectDelayin interfaceChannelAdaptorMBean
-
getReconnectDelay
- Specified by:
getReconnectDelayin interfaceChannelAdaptorMBean
-
setInQueue
- Specified by:
setInQueuein interfaceChannelAdaptorMBean
-
getInQueue
- Specified by:
getInQueuein interfaceChannelAdaptorMBean
-
setOutQueue
- Specified by:
setOutQueuein interfaceChannelAdaptorMBean
-
send
-
send
-
receive
-
receive
-
isConnected
- Specified by:
isConnectedin interfaceChannelAdaptorMBean- Returns:
- true if channel is connected
-
getOutQueue
- Specified by:
getOutQueuein interfaceChannelAdaptorMBean
-
newChannel
Parses a<channel>element, returning anISOChannel- Throws:
ConfigurationException
-
addFilters
protected void addFilters(FilteredChannel channel, org.jdom2.Element e, QFactory fact) throws ConfigurationException - Throws:
ConfigurationException
-
initChannel
- Throws:
ConfigurationException
-
initSpaceAndQueues
- Throws:
ConfigurationException
-
checkConnection
-
disconnect
-
setHost
- Specified by:
setHostin interfaceChannelAdaptorMBean
-
getHost
- Specified by:
getHostin interfaceChannelAdaptorMBean
-
setPort
- Specified by:
setPortin interfaceChannelAdaptorMBean
-
getPort
- Specified by:
getPortin interfaceChannelAdaptorMBean
-
setSocketFactory
- Specified by:
setSocketFactoryin interfaceChannelAdaptorMBean
-
resetCounters
- Specified by:
resetCountersin interfaceChannelAdaptorMBean
-
getCountersAsString
- Specified by:
getCountersAsStringin interfaceChannelAdaptorMBean
-
getTXCounter
- Specified by:
getTXCounterin interfaceChannelAdaptorMBean
-
getRXCounter
- Specified by:
getRXCounterin interfaceChannelAdaptorMBean
-
getConnectsCounter
- Specified by:
getConnectsCounterin interfaceChannelAdaptorMBean
-
getLastTxnTimestampInMillis
- Specified by:
getLastTxnTimestampInMillisin interfaceChannelAdaptorMBean
-
getIdleTimeInMillis
- Specified by:
getIdleTimeInMillisin interfaceChannelAdaptorMBean
-
getSocketFactory
- Specified by:
getSocketFactoryin interfaceChannelAdaptorMBean
-
dump
-
grabSpace
-
append
-