Class MUXPool
java.lang.Object
org.jpos.q2.QBeanSupport
org.jpos.q2.iso.MUXPool
- All Implemented Interfaces:
Configurable, ISOSource, MUX, MUXPoolMBean, QBean, QBeanSupportMBean, QPersist
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA class implementing this interface can be added to aMUXPoolto override the classical built-in strategies.
It could be added to aMUXPoollike this: -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intFields inherited from class QBeanSupport
cfg, log, scheduledThreadPoolExecutor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected MUXfirstAvailableMUX(long maxWait) String[]intprotected voidinitHandler(org.jdom2.Element e) voidbooleanprotected MUXnextAvailableMUX(int mnumber, long maxWait) Sends a message to remote host and wait for responsevoidrequest(ISOMsg m, long timeout, ISOResponseListener r, Object handBack) Sends a message to remote host in async wayvoidsends (or hands back) an ISOMsgvoidMethods inherited from class QBeanSupport
addAttr, close, createElement, destroy, destroyService, 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, startService, 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
-
Field Details
-
PRIMARY_SECONDARY
- See Also:
-
ROUND_ROBIN
- See Also:
-
ROUND_ROBIN_WITH_OVERRIDE
- See Also:
-
SPLIT_BY_DIVISOR
- See Also:
-
-
Constructor Details
-
MUXPool
public MUXPool()
-
-
Method Details
-
initService
- Overrides:
initServicein classQBeanSupport- Throws:
ConfigurationException
-
stopService
- Overrides:
stopServicein classQBeanSupport
-
initHandler
- Throws:
ConfigurationException
-
request
Description copied from interface:MUXSends a message to remote host and wait for response- Specified by:
requestin interfaceMUX- Parameters:
m- message to sendtimeout- time to wait for a message- Returns:
- received message or null
- Throws:
ISOException
-
request
public void request(ISOMsg m, long timeout, ISOResponseListener r, Object handBack) throws ISOException Description copied from interface:MUXSends a message to remote host in async way- Specified by:
requestin interfaceMUX- Parameters:
m- message to sendtimeout- time to wait for the responser- reference to response listenerhandBack- optional handback to be given to reponse listener- Throws:
ISOException
-
send
Description copied from interface:ISOSourcesends (or hands back) an ISOMsg- Specified by:
sendin interfaceISOSource- Parameters:
m- the Message to be sent- Throws:
ISOExceptionIOException
-
firstAvailableMUX
-
nextAvailableMUX
-
getMuxNames
- Specified by:
getMuxNamesin interfaceMUXPoolMBean
-
getStrategy
- Specified by:
getStrategyin interfaceMUXPoolMBean
-
getStrategyHandler
-
isConnected
- Specified by:
isConnectedin interfaceISOSource- Returns:
- true if source is connected and usable
-