public abstract class ConnectionStrategyServerConnectorAdapter extends Object implements ConnectionStrategyServerConnector
ConnectionStrategyServerConnectorAdapter
is an abstract default implementation of ConnectionStrategyServerConnector
and offers some general methods for the internal operation which can be useful for various connection strategies.
The ConnectionStrategyServerConnector
listens for occurring events (Event
)
on the server side and has the task to prepare the transfer from the server side to the client side.
The reason for the listen and transfer preparation within one single class is, that the ConnectionStrategyServerConnector
should have the control about listening and transfer of the occurred events.Modifier | Constructor and Description |
---|---|
protected |
ConnectionStrategyServerConnectorAdapter(EventServiceConfiguration aConfiguration)
Creates a new connection strategy with a configuration (
EventServiceConfiguration ). |
Modifier and Type | Method and Description |
---|---|
protected static byte[] |
encode(String aString)
Encodes an string with the configured encoding.
|
protected EventServiceConfiguration |
getConfiguration()
Returns the configuration which was provided to this connector adapter.
|
protected static String |
getEncoding()
Returns the configured encoding.
|
protected boolean |
waitMaxWaitingTime(UserInfo aUserInfo)
Waits for the configured max. waiting time and returns whether the max. waiting time
was exceed or was interrupted by an occurred event (notification).
|
protected void |
waitMinWaitingTime()
Waits for the configured min. waiting time.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
listen
protected ConnectionStrategyServerConnectorAdapter(EventServiceConfiguration aConfiguration)
EventServiceConfiguration
).aConfiguration
- configurationprotected EventServiceConfiguration getConfiguration()
protected void waitMinWaitingTime() throws EventServiceException
EventServiceException
ConfigParameter.MIN_WAITING_TIME_TAG
protected boolean waitMaxWaitingTime(UserInfo aUserInfo) throws EventServiceException
aUserInfo
- userEventServiceException
- can occur when the waiting was interrupted by an errorprotected static String getEncoding() throws EventServiceException
EventServiceException
protected static byte[] encode(String aString) throws EventServiceException
aString
- String to encodeEventServiceException
Copyright © 2012. All Rights Reserved.