Package org.jpos.q2.iso
Class QServer
- java.lang.Object
-
- org.jpos.q2.QBeanSupport
-
- org.jpos.q2.iso.QServer
-
- All Implemented Interfaces:
Configurable
,ISORequestListener
,QServerMBean
,QBean
,QBeanSupportMBean
,QPersist
,SpaceListener
public class QServer extends QBeanSupport implements QServerMBean, SpaceListener, ISORequestListener
ISO Server wrapper.
-
-
Field Summary
Fields Modifier and Type Field Description protected LocalSpace
sp
-
Fields inherited from class org.jpos.q2.QBeanSupport
cfg, log, scheduledThreadPoolExecutor
-
-
Constructor Summary
Constructors Constructor Description QServer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroyService()
java.lang.String
getChannel()
java.lang.String
getCountersAsString()
java.lang.String
getCountersAsString(java.lang.String isoChannelName)
java.lang.String
getISOChannelNames()
ISOServer
getISOServer()
int
getMaxSessions()
int
getMinSessions()
java.lang.String
getPackager()
int
getPort()
java.lang.String
getSocketFactory()
void
initService()
void
notify(java.lang.Object key, java.lang.Object value)
Called by Space implementation whenever an object with the given key is being placed in the Space.boolean
process(ISOSource source, ISOMsg m)
void
setChannel(java.lang.String channel)
void
setMaxSessions(int maxSessions)
void
setMinSessions(int minSessions)
void
setPackager(java.lang.String packager)
void
setPort(int port)
void
setSocketFactory(java.lang.String sFactory)
void
startService()
void
stopService()
-
Methods inherited from class org.jpos.q2.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, 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.QBean
destroy, getState, getStateAsString, init, start, stop
-
Methods inherited from interface org.jpos.q2.QBeanSupportMBean
getDump, getLoader, getLoaderURLS, getLogger, getName, getRealm, getServer, setLogger, setName, setPersist, setRealm, setServer
-
Methods inherited from interface org.jpos.q2.QPersist
getPersist, isModified
-
-
-
-
Field Detail
-
sp
protected LocalSpace sp
-
-
Constructor Detail
-
QServer
public QServer()
-
-
Method Detail
-
initService
public void initService() throws ConfigurationException
- Overrides:
initService
in classQBeanSupport
- Throws:
ConfigurationException
-
startService
public void startService()
- Overrides:
startService
in classQBeanSupport
-
stopService
public void stopService()
- Overrides:
stopService
in classQBeanSupport
-
destroyService
public void destroyService()
- Overrides:
destroyService
in classQBeanSupport
-
setPort
public void setPort(int port)
- Specified by:
setPort
in interfaceQServerMBean
-
getPort
public int getPort()
- Specified by:
getPort
in interfaceQServerMBean
-
setPackager
public void setPackager(java.lang.String packager)
- Specified by:
setPackager
in interfaceQServerMBean
-
getPackager
public java.lang.String getPackager()
- Specified by:
getPackager
in interfaceQServerMBean
-
setChannel
public void setChannel(java.lang.String channel)
- Specified by:
setChannel
in interfaceQServerMBean
-
getChannel
public java.lang.String getChannel()
- Specified by:
getChannel
in interfaceQServerMBean
-
setMaxSessions
public void setMaxSessions(int maxSessions)
- Specified by:
setMaxSessions
in interfaceQServerMBean
-
getMaxSessions
public int getMaxSessions()
- Specified by:
getMaxSessions
in interfaceQServerMBean
-
setMinSessions
public void setMinSessions(int minSessions)
- Specified by:
setMinSessions
in interfaceQServerMBean
-
getMinSessions
public int getMinSessions()
- Specified by:
getMinSessions
in interfaceQServerMBean
-
setSocketFactory
public void setSocketFactory(java.lang.String sFactory)
- Specified by:
setSocketFactory
in interfaceQServerMBean
-
getSocketFactory
public java.lang.String getSocketFactory()
- Specified by:
getSocketFactory
in interfaceQServerMBean
-
getISOChannelNames
public java.lang.String getISOChannelNames()
- Specified by:
getISOChannelNames
in interfaceQServerMBean
-
getISOServer
public ISOServer getISOServer()
-
getCountersAsString
public java.lang.String getCountersAsString()
- Specified by:
getCountersAsString
in interfaceQServerMBean
-
getCountersAsString
public java.lang.String getCountersAsString(java.lang.String isoChannelName)
- Specified by:
getCountersAsString
in interfaceQServerMBean
-
notify
public void notify(java.lang.Object key, java.lang.Object value)
Description copied from interface:SpaceListener
Called by Space implementation whenever an object with the given key is being placed in the Space.
- Specified by:
notify
in interfaceSpaceListener
- Parameters:
key
- Object's keyvalue
- Object's value
-
process
public boolean process(ISOSource source, ISOMsg m)
- Specified by:
process
in interfaceISORequestListener
- Parameters:
source
- source where you optionally can replym
- the unmatched request- Returns:
- true if request was handled by this listener
-
-