de.novanic.eventservice.client.event.listener.unlisten
Interface UnlistenEvent

All Superinterfaces:
Event, java.io.Serializable
All Known Implementing Classes:
DefaultUnlistenEvent

public interface UnlistenEvent
extends Event

An UnlistenEvent will be triggered when a timeout or a domain specific unlisten/deregistration occurs. The UnlistenEvent is created by EventService when unlisten is called for a user. It will also be returned as an event (from the listen method) and will be added to the UnlistenDomain DomainFactory.UNLISTEN_DOMAIN.

Author:
sstrohschein
Date: 16.08.2009
Time: 01:01:09
See Also:
EventService.unlisten(), EventService.unlisten(Domain), EventService.unlisten(java.util.Set)

Method Summary
 java.util.Set<Domain> getDomains()
          Returns the domain for which isn't listening anymore.
 java.lang.String getUserId()
          Returns the unlistened user id for the UnlistenEvent.
 boolean isLocal()
          Returns true when the UnlistenEvent is triggered from the client side.
 boolean isTimeout()
          Returns true when the UnlistenEvent is a timeout, otherwise false (for example a domain specific UnlistenEvent).
 void setDomains(java.util.Set<Domain> aDomains)
          A Domain can be set to the UnlistenEvent when the unlisten event is domain specific.
 void setLocal(boolean isLocal)
          Sets the local flag.
 void setTimeout(boolean aTimeout)
          Sets the timeout flag.
 void setUserId(java.lang.String aUserId)
          Sets the unlistened user id for the UnlistenEvent.
 

Method Detail

setDomains

void setDomains(java.util.Set<Domain> aDomains)
A Domain can be set to the UnlistenEvent when the unlisten event is domain specific.

Parameters:
aDomains - unlistened domains

getDomains

java.util.Set<Domain> getDomains()
Returns the domain for which isn't listening anymore. If the UnlistenEvent is global (for example a timeout), this method returns NULL.

Returns:
unlistened domains

setUserId

void setUserId(java.lang.String aUserId)
Sets the unlistened user id for the UnlistenEvent.

Parameters:
aUserId - unlistened user id

getUserId

java.lang.String getUserId()
Returns the unlistened user id for the UnlistenEvent.

Returns:
unlistened user id

isTimeout

boolean isTimeout()
Returns true when the UnlistenEvent is a timeout, otherwise false (for example a domain specific UnlistenEvent).

Returns:
true when timeout, otherwise false (for example a domain specific UnlistenEvent)

setTimeout

void setTimeout(boolean aTimeout)
Sets the timeout flag. It should be set true when the UnlistenEvent marks a timeout, otherwise false (for example a domain specific UnlistenEvent).

Parameters:
aTimeout - true when the UnlistenEvent marks a timeout, otherwise false (for example a domain specific UnlistenEvent)

isLocal

boolean isLocal()
Returns true when the UnlistenEvent is triggered from the client side. That can for example occur on connection errors.

Returns:
true when triggered from client side, otherwise false

setLocal

void setLocal(boolean isLocal)
Sets the local flag. It should be set true when the UnlistenEvent is triggered from the client side. That can for example occur on connection errors.

Parameters:
isLocal - true when triggered from client side, otherwise false