public class DefaultClientConnector extends Object implements ConnectionStrategyClientConnector
ConnectionStrategyClientConnector
listens for occurred events (Event
)
of the server side and has the task to encode / process the transferred events at the client side.
The DefaultClientConnector
implements the listen method with simple calls to the EventServiceAsync
and no special encoding of the occurred events.Constructor and Description |
---|
DefaultClientConnector() |
Modifier and Type | Method and Description |
---|---|
void |
deactivate()
Deactivates the
ConnectionStrategyClientConnector . |
void |
init(EventServiceAsync anEventService)
Initializes the
ConnectionStrategyClientConnector with
the EventServiceAsync . |
boolean |
isInitialized()
Checks if the
ConnectionStrategyClientConnector is
initialized. |
void |
listen(EventNotification anEventNotification,
AsyncCallback<List<DomainEvent>> aCallback)
The listen method implements the listen / connection strategy to receive occurred events.
|
public DefaultClientConnector()
public void init(EventServiceAsync anEventService)
ConnectionStrategyClientConnector
with
the EventServiceAsync
.init
in interface ConnectionStrategyClientConnector
anEventService
- the EventServiceAsync
public void deactivate()
ConnectionStrategyClientConnector
.deactivate
in interface ConnectionStrategyClientConnector
public boolean isInitialized()
ConnectionStrategyClientConnector
is
initialized.isInitialized
in interface ConnectionStrategyClientConnector
ConnectionStrategyClientConnector
is
initialized, otherwise falsepublic void listen(EventNotification anEventNotification, AsyncCallback<List<DomainEvent>> aCallback)
EventNotification
and to the callback.
The DefaultClientConnector
implements the listen method with simple calls to the EventServiceAsync
and no special encoding of the occurred events.listen
in interface ConnectionStrategyClientConnector
anEventNotification
- EventNotification
which will be notified about occurred / received eventsaCallback
- The callback will be notified about occurred / received events.Copyright © 2012. All Rights Reserved.