|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.genesyslab.platform.applicationblocks.commons.broker.BrokerServiceBase<T>
com.genesyslab.platform.applicationblocks.commons.broker.MessageBrokerService<T>
setMessageHandler(handler)
to handle incoming messages asynchronously.
@Deprecated public abstract class MessageBrokerService<T>
MessageBrokerService<T>
class implements the Publish/Subscribe pattern.
This class has a specific behavior - it performs synchronous wait in AsyncInvoker for incoming events,
so, it requires dedicated invoker to be permanently busy with reading task.
The alternative for broker service functionality without fully occupied invoker is to use
EventReceivingBrokerService and RequestReceivingBrokerService which are
receivers by themselves and can be used as "external receivers" in protocol connections
to handle messages directly without intermediate queues.
EventReceivingBrokerService
,
RequestReceivingBrokerService
Nested Class Summary | |
---|---|
protected static class |
MessageBrokerService.LifecycleStage
Deprecated. |
Field Summary | |
---|---|
protected java.lang.Object |
lifecycleLock
Deprecated. |
protected MessageBrokerService.LifecycleStage |
status
Deprecated. |
Constructor Summary | |
---|---|
protected |
MessageBrokerService()
Deprecated. Creates an instance of MessageBrokerService class. |
protected |
MessageBrokerService(AsyncInvoker theInvoker)
Deprecated. Creates an instance of MessageBrokerService class. |
Method Summary | |
---|---|
void |
activate()
Deprecated. Activates the service. |
void |
deactivate()
Deprecated. Deactivates the service. |
void |
dispose()
Deprecated. Disposes of the service. |
protected abstract Receiver |
getGenericReceiver()
Deprecated. |
AsyncInvoker |
getInvoker()
Deprecated. Gets asynchronous invoker. |
boolean |
isActive()
Deprecated. Checks if the service is active. |
protected abstract T |
receive()
Deprecated. |
void |
setInvoker(AsyncInvoker theInvoker)
Deprecated. Sets asynchronous invoker. |
Methods inherited from class com.genesyslab.platform.applicationblocks.commons.broker.BrokerServiceBase |
---|
notify, onNotificationException, onPublish, publish, register, register, switchSubscribersList, unregister, unregister, unregisterAll |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected MessageBrokerService.LifecycleStage status
protected final java.lang.Object lifecycleLock
Constructor Detail |
---|
protected MessageBrokerService()
MessageBrokerService
class.
protected MessageBrokerService(AsyncInvoker theInvoker)
MessageBrokerService
class.
theInvoker
- Initializes asynchronous invokerMethod Detail |
---|
public AsyncInvoker getInvoker()
public void setInvoker(AsyncInvoker theInvoker)
theInvoker
- asynchronous invokerpublic boolean isActive()
public void activate()
public void deactivate()
public void dispose()
protected abstract T receive() throws java.lang.InterruptedException
java.lang.InterruptedException
protected abstract Receiver getGenericReceiver()
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |