public class DefaultUnlistenEvent extends Object implements UnlistenEvent
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
.EventService.unlisten()
,
EventService.unlisten(Domain)
,
EventService.unlisten(java.util.Set)
,
Serialized FormConstructor and Description |
---|
DefaultUnlistenEvent()
Creates an UnlistenEvent for all domains (global).
|
DefaultUnlistenEvent(Set<Domain> aDomains,
String aUserId,
boolean isTimeout)
Creates an UnlistenEvent for a specific domain.
|
DefaultUnlistenEvent(Set<Domain> aDomains,
String aUserId,
boolean isTimeout,
boolean isLocal)
Creates an UnlistenEvent for a specific domain.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object anObject) |
Set<Domain> |
getDomains()
Returns the domain for which isn't listening anymore.
|
String |
getUserId()
Returns the unlistened user id for the UnlistenEvent.
|
int |
hashCode() |
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(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(String aUserId)
Sets the unlistened user id for the UnlistenEvent.
|
String |
toString() |
public DefaultUnlistenEvent()
public DefaultUnlistenEvent(Set<Domain> aDomains, String aUserId, boolean isTimeout)
aDomains
- Domain
which are unlistened (in combination with the user id)aUserId
- user id which is unlistened (in combination with the domain)isTimeout
- true when the creation of the UnlistenEvent is caused by a timeoutpublic DefaultUnlistenEvent(Set<Domain> aDomains, String aUserId, boolean isTimeout, boolean isLocal)
UnlistenEvent.isLocal()
).aDomains
- Domain
which are unlistened (in combination with the user id)aUserId
- user id which is unlistened (in combination with the domain)isTimeout
- true when the creation of the UnlistenEvent is caused by a timeoutisLocal
- true when the UnlistenEvent was created from the client side (see UnlistenEvent.isLocal()
).public void setDomains(Set<Domain> aDomains)
Domain
can be set to the UnlistenEvent when the unlisten event
is domain specific.setDomains
in interface UnlistenEvent
aDomains
- unlistened domainspublic Set<Domain> getDomains()
getDomains
in interface UnlistenEvent
public void setUserId(String aUserId)
setUserId
in interface UnlistenEvent
aUserId
- unlistened user idpublic String getUserId()
getUserId
in interface UnlistenEvent
public boolean isTimeout()
isTimeout
in interface UnlistenEvent
public void setTimeout(boolean aTimeout)
setTimeout
in interface UnlistenEvent
aTimeout
- true when the UnlistenEvent marks a timeout, otherwise false (for example a domain specific UnlistenEvent)public boolean isLocal()
isLocal
in interface UnlistenEvent
public void setLocal(boolean isLocal)
setLocal
in interface UnlistenEvent
isLocal
- true when triggered from client side, otherwise falseCopyright © 2012. All Rights Reserved.