public class JmsServer extends LogEventListener implements javax.jms.MessageListener, LifeCycle2
Destination.LifeCycle.StateLOGGER| Constructor and Description |
|---|
JmsServer(String connectionFactoryBindingName,
String destinationBindingName,
String username,
String password) |
| Modifier and Type | Method and Description |
|---|---|
LifeCycle.State |
getState()
Gets the life-cycle state.
|
void |
initialize() |
boolean |
isStarted() |
boolean |
isStopped() |
void |
onMessage(javax.jms.Message message) |
void |
run()
Starts and runs this server until the user types "exit" into standard input.
|
void |
start() |
void |
stop() |
boolean |
stop(long timeout,
TimeUnit timeUnit)
Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs, or the current
thread is interrupted, whichever happens first.
|
logpublic LifeCycle.State getState()
LifeCyclepublic void onMessage(javax.jms.Message message)
onMessage in interface javax.jms.MessageListenerpublic void initialize()
initialize in interface LifeCyclepublic boolean stop(long timeout,
TimeUnit timeUnit)
LifeCycle2stop in interface LifeCycle2timeout - the maximum time to waittimeUnit - the time unit of the timeout argumentpublic void run()
throws IOException
IOExceptionCopyright © 1999-2016 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.