|
xmlBlaster 2.1.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xmlBlaster.protocol.stomp.XbStompDriver
public class XbStompDriver
XbStomp driver class to invoke the xmlBlaster server over STOMP protocol.
| Field Summary | |
|---|---|
private AddressServer |
addressServer
|
private I_Authenticate |
authenticate
The singleton handle for this authentication server |
private java.util.Set<XbStompInOutBridge> |
clientSet
Remember all client connections |
private int |
connectCounter
|
protected ContextNode |
contextNode
|
private Global |
glob
The global handle |
private boolean |
isShutdown
|
private java.net.URI |
location
|
private static java.util.logging.Logger |
log
|
protected java.lang.Object |
mbeanHandle
My JMX registration |
private java.lang.String |
ME
|
private javax.net.ServerSocketFactory |
serverSocketFactory
|
private SocketUrl |
socketUrl
The socket address info object holding hostname (useful for multi homed hosts) and port |
private org.codehaus.stomp.tcp.TcpTransportServer |
tcpServer
|
| Constructor Summary | |
|---|---|
XbStompDriver()
|
|
| Method Summary | |
|---|---|
void |
activate()
Activate xmlBlaster access through this protocol so that a client can contact us. |
boolean |
addClient(XbStompInOutBridge client)
|
int |
clearClients()
|
int |
countClients()
|
org.codehaus.stomp.StompHandler |
createStompHandler(org.codehaus.stomp.StompHandler outputHandler)
Callback StompHandlerFactory on new client connection |
protected org.codehaus.stomp.tcp.TcpTransportServer |
createTcpServer()
|
void |
deActivate()
Deactivate xmlBlaster access (standby), no clients can connect. |
protected void |
doStart()
|
protected void |
doStop()
|
XbStompInOutBridge |
findClient(java.lang.String loginName)
|
java.lang.String |
freeBlockingCallbackThread(java.lang.String loginName)
|
java.lang.String[] |
getClientDump()
|
XbStompInOutBridge[] |
getClients()
|
java.lang.String |
getEnvPrefix()
The command line key prefix |
java.net.URI |
getLocation()
Stomp specific url syntax |
java.lang.String |
getName()
Get a human readable name of this driver |
java.lang.String |
getProtocolId()
Access the xmlBlaster internal name of the protocol driver. |
java.lang.String |
getRawAddress()
Return the address how to access this driver. |
javax.net.ServerSocketFactory |
getServerSocketFactory()
|
org.codehaus.stomp.tcp.TcpTransportServer |
getTcpServer()
|
java.lang.String |
getType()
The unique name of the plugin (together with the version). |
java.lang.String |
getUsageUrl()
|
java.lang.String |
getVersion()
The version of the plugin |
void |
init(Global glob,
PluginInfo pluginInfo)
This method is called by the PluginManager. |
boolean |
isActive()
Access the current state |
boolean |
isShutdown()
Check status |
void |
join()
Joins with the background thread until the transport is stopped |
boolean |
removeClient(XbStompInOutBridge client)
|
void |
setServerSocketFactory(javax.net.ServerSocketFactory serverSocketFactory)
Sets the ServerSocketFactory to use to listen for STOMP frames |
void |
setUsageUrl(java.lang.String url)
|
java.lang.String[] |
showBlockingCallbackTreads(java.lang.String loginName)
|
void |
shutdown()
Shutdown the plugin, free resources. |
java.lang.String |
usage()
Command line usage. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static java.util.logging.Logger log
private java.lang.String ME
private Global glob
private SocketUrl socketUrl
private java.net.URI location
private javax.net.ServerSocketFactory serverSocketFactory
private org.codehaus.stomp.tcp.TcpTransportServer tcpServer
private AddressServer addressServer
private I_Authenticate authenticate
protected java.lang.Object mbeanHandle
protected ContextNode contextNode
private boolean isShutdown
private java.util.Set<XbStompInOutBridge> clientSet
private int connectCounter
| Constructor Detail |
|---|
public XbStompDriver()
| Method Detail |
|---|
public void activate()
throws XmlBlasterException
I_Driver
activate in interface I_Driveractivate in interface I_AdminServiceXmlBlasterExceptionpublic void deActivate()
I_Driver
deActivate in interface I_DriverdeActivate in interface I_AdminServicepublic java.lang.String freeBlockingCallbackThread(java.lang.String loginName)
freeBlockingCallbackThread in interface XbStompDriverMBeanpublic java.lang.String[] showBlockingCallbackTreads(java.lang.String loginName)
showBlockingCallbackTreads in interface XbStompDriverMBeanpublic java.lang.String getName()
I_Driver
getName in interface I_Driverpublic java.lang.String getProtocolId()
I_Driver
getProtocolId in interface I_Driverpublic java.lang.String getRawAddress()
I_Driver
getRawAddress in interface I_DrivergetRawAddress in interface XbStompDriverMBeanpublic java.lang.String getEnvPrefix()
public java.lang.String usage()
usage in interface I_Driverusage in interface I_AdminUsagepublic java.lang.String getType()
I_AdminPlugin
getType in interface I_AdminPlugingetType in interface I_Pluginpublic java.lang.String getVersion()
I_AdminPlugin
getVersion in interface I_AdminPlugingetVersion in interface I_Plugin
public void init(Global glob,
PluginInfo pluginInfo)
throws XmlBlasterException
I_Plugin
// An entry in xmlBlaster.properties (in one line):
MimeSubscribePlugin[ContentLenFilter][1.0]=\
org.xmlBlaster.engine.mime.demo.ContentLenFilter,\
DEFAULT_MAX_LEN=200,DEFAULT_MIN_LEN=20
// Access it like this:
java.util.Properties props = pluginInfo.getParameters();
String maxLen = (String)props.get("DEFAULT_MAX_LEN");
String throwLen = (String)props.get("THROW_EXCEPTION_FOR_LEN");
init in interface I_PluginXmlBlasterException
public void shutdown()
throws XmlBlasterException
I_AdminPlugin
shutdown in interface I_AdminPluginshutdown in interface I_PluginXmlBlasterException - if an exception occurs. The exception is
handled by the RunLevelManager depending on how the plugin has been
configured with the action:
<action do='STOP' onShutdownRunlevel='2' sequence='5'
onFail='resource.configuration.pluginFailed'>
If onFail is defined to something, the RunLevelManager will stop.public boolean isShutdown()
I_AdminPlugin
isShutdown in interface I_AdminPluginpublic XbStompInOutBridge[] getClients()
public XbStompInOutBridge findClient(java.lang.String loginName)
public boolean addClient(XbStompInOutBridge client)
public boolean removeClient(XbStompInOutBridge client)
public int clearClients()
public int countClients()
countClients in interface XbStompDriverMBeanpublic java.lang.String[] getClientDump()
getClientDump in interface XbStompDriverMBeanpublic org.codehaus.stomp.StompHandler createStompHandler(org.codehaus.stomp.StompHandler outputHandler)
createStompHandler in interface org.codehaus.stomp.StompHandlerFactory
public void join()
throws java.io.IOException,
java.net.URISyntaxException,
java.lang.InterruptedException
java.io.IOException
java.net.URISyntaxException
java.lang.InterruptedException
public java.net.URI getLocation()
throws java.net.URISyntaxException
java.net.URISyntaxExceptionpublic javax.net.ServerSocketFactory getServerSocketFactory()
public void setServerSocketFactory(javax.net.ServerSocketFactory serverSocketFactory)
ServerSocketFactory to use to listen for STOMP frames
public org.codehaus.stomp.tcp.TcpTransportServer getTcpServer()
throws java.io.IOException,
java.net.URISyntaxException
java.io.IOException
java.net.URISyntaxException
protected org.codehaus.stomp.tcp.TcpTransportServer createTcpServer()
throws java.io.IOException,
java.net.URISyntaxException
java.io.IOException
java.net.URISyntaxException
protected void doStart()
throws java.lang.Exception
java.lang.Exception
protected void doStop()
throws java.lang.Exception
java.lang.Exceptionpublic boolean isActive()
I_AdminService
isActive in interface I_AdminServicepublic java.lang.String getUsageUrl()
getUsageUrl in interface I_AdminUsagepublic void setUsageUrl(java.lang.String url)
setUsageUrl in interface I_AdminUsage
|
xmlBlaster 2.1.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||