Class OneShotChannelAdaptor
java.lang.Object
org.jpos.q2.QBeanSupport
org.jpos.q2.iso.OneShotChannelAdaptor
- All Implemented Interfaces:
Configurable, Channel, OneShotChannelAdaptorMBean, QBean, QBeanSupportMBean, QPersist
public class OneShotChannelAdaptor
extends QBeanSupport
implements OneShotChannelAdaptorMBean, Channel
OneShotChannelAdaptor connects and disconnects a channel for every message
exchange.
<channel ...
...
...
</channel>
<max-connections>5</max-connections>
<max-connect-attempts>15</max-connect-attempts>
<in>send</in>
<out>receive</out>
</client>
Example qbean:
<client class="org.jpos.q2.iso.OneShotChannelAdaptor" logger="Q2" name="channel-adaptor"><channel ...
...
...
</channel>
<max-connections>5</max-connections>
<max-connect-attempts>15</max-connect-attempts>
<in>send</in>
<out>receive</out>
</client>
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class QBeanSupport
cfg, log, scheduledThreadPoolExecutor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgetHost()intgetPort()voidreceive()Receive messagereceive(long timeout) Receive messagevoidQueue a message to be transmitted by this adaptorvoidQueue a message to be transmitted by this adaptorvoidvoidsetInQueue(String in) voidsetOutQueue(String out) voidsetPort(int port) 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, initService, 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 QBeanSupportMBean
getDump, getLoader, getLoaderURLS, getLogger, getName, getRealm, getServer, setLogger, setName, setPersist, setRealm, setServerMethods inherited from interface QPersist
getPersist, isModified
-
Constructor Details
-
OneShotChannelAdaptor
public OneShotChannelAdaptor()
-
-
Method Details
-
initAdaptor
-
startService
- Overrides:
startServicein classQBeanSupport
-
stopService
- Overrides:
stopServicein classQBeanSupport
-
destroyService
- Overrides:
destroyServicein classQBeanSupport
-
send
-
send
-
receive
-
receive
-
setInQueue
- Specified by:
setInQueuein interfaceOneShotChannelAdaptorMBean
-
getInQueue
- Specified by:
getInQueuein interfaceOneShotChannelAdaptorMBean
-
setOutQueue
- Specified by:
setOutQueuein interfaceOneShotChannelAdaptorMBean
-
getOutQueue
- Specified by:
getOutQueuein interfaceOneShotChannelAdaptorMBean
-
setHost
- Specified by:
setHostin interfaceOneShotChannelAdaptorMBean
-
getHost
- Specified by:
getHostin interfaceOneShotChannelAdaptorMBean
-
setPort
- Specified by:
setPortin interfaceOneShotChannelAdaptorMBean
-
getPort
- Specified by:
getPortin interfaceOneShotChannelAdaptorMBean
-
setSocketFactory
- Specified by:
setSocketFactoryin interfaceOneShotChannelAdaptorMBean
-
getSocketFactory
- Specified by:
getSocketFactoryin interfaceOneShotChannelAdaptorMBean
-