org.jpos.q2.iso
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.
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>
- Version:
- $Revision: 2612 $ $Date: 2008-03-12 04:38:43 -0700 (Wed, 12 Mar 2008) $
- Author:
- Alejandro Revilla, Thomas L. Kjeldsen
| 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 |
OneShotChannelAdaptor
public OneShotChannelAdaptor()
initAdaptor
public void initAdaptor()
startService
public void startService()
stopService
public void stopService()
destroyService
public void destroyService()
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
setInQueue
public void setInQueue(java.lang.String in)
- Specified by:
setInQueue in interface OneShotChannelAdaptorMBean
getInQueue
public java.lang.String getInQueue()
- Specified by:
getInQueue in interface OneShotChannelAdaptorMBean
setOutQueue
public void setOutQueue(java.lang.String out)
- Specified by:
setOutQueue in interface OneShotChannelAdaptorMBean
getOutQueue
public java.lang.String getOutQueue()
- Specified by:
getOutQueue in interface OneShotChannelAdaptorMBean
setHost
public void setHost(java.lang.String host)
- Specified by:
setHost in interface OneShotChannelAdaptorMBean
getHost
public java.lang.String getHost()
- Specified by:
getHost in interface OneShotChannelAdaptorMBean
setPort
public void setPort(int port)
- Specified by:
setPort in interface OneShotChannelAdaptorMBean
getPort
public int getPort()
- Specified by:
getPort in interface OneShotChannelAdaptorMBean
setSocketFactory
public void setSocketFactory(java.lang.String sFac)
- Specified by:
setSocketFactory in interface OneShotChannelAdaptorMBean
getSocketFactory
public java.lang.String getSocketFactory()
- Specified by:
getSocketFactory in interface OneShotChannelAdaptorMBean