|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.openexchange.mail.event.PooledEvent
public final class PooledEvent
PooledEvent - A pooled event.
| Constructor Summary | |
|---|---|
PooledEvent(int contextId,
int userId,
int accountId,
java.lang.String fullname,
boolean contentRelated,
boolean immediateDelivery,
com.openexchange.session.Session session)
Initializes a new PooledEvent with default topic. |
|
PooledEvent(java.lang.String topic,
int contextId,
int userId,
int accountId,
java.lang.String fullname,
boolean contentRelated,
boolean immediateDelivery,
com.openexchange.session.Session session)
Initializes a new PooledEvent. |
|
| Method Summary | |
|---|---|
int |
compareTo(java.util.concurrent.Delayed o)
|
boolean |
equals(java.lang.Object obj)
|
boolean |
equalsByUser(int userId,
int contextId)
Checks if this pooled events matches specified user ID and context ID. |
int |
getAccountId()
Gets the account ID. |
int |
getContextId()
Gets the context ID. |
long |
getDelay(java.util.concurrent.TimeUnit unit)
|
java.lang.String |
getFullname()
Gets the fullname |
com.openexchange.session.Session |
getSession()
Gets the session |
java.lang.String |
getTopic()
Gets the topic for this event. |
int |
getUserId()
Gets the user ID. |
int |
hashCode()
|
boolean |
isAsync()
Checks whether the event should be delivered asynchronously. |
boolean |
isContentRelated()
Checks for a content-related event. |
long |
lastAccessed()
Gets this pooled notification's last-accessed time stamp. |
PooledEvent |
setAsync(boolean async)
Sets whether the event should be delivered asynchronously (default behavior). |
void |
touch()
Touches this pooled notification; meaning its last-accessed time stamp is set to now. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PooledEvent(int contextId,
int userId,
int accountId,
java.lang.String fullname,
boolean contentRelated,
boolean immediateDelivery,
com.openexchange.session.Session session)
PooledEvent with default topic.
contextId - The context IDuserId - The user IDaccountId - The account IDfullname - The folder fullnamecontentRelated - true for a content-related event; otherwise falseimmediateDelivery - true for immediate delivery; otherwise falsesession - The session
public PooledEvent(java.lang.String topic,
int contextId,
int userId,
int accountId,
java.lang.String fullname,
boolean contentRelated,
boolean immediateDelivery,
com.openexchange.session.Session session)
PooledEvent.
contextId - The context IDuserId - The user IDaccountId - The account IDfullname - The folder fullnamecontentRelated - true for a content-related event; otherwise falseimmediateDelivery - true for immediate delivery; otherwise falsesession - The session| Method Detail |
|---|
public PooledEvent setAsync(boolean async)
false
EventPool.put(PooledEvent) does not return to the caller until delivery of the event is completed.
Note: Works only if this pooled event is considered for immediate delivery.
async - true to deliver asynchronously; otherwise false
public boolean isAsync()
true to deliver asynchronously; otherwise falsepublic long getDelay(java.util.concurrent.TimeUnit unit)
getDelay in interface java.util.concurrent.Delayedpublic int compareTo(java.util.concurrent.Delayed o)
compareTo in interface java.lang.Comparable<java.util.concurrent.Delayed>public java.lang.String getTopic()
public void touch()
public long lastAccessed()
public boolean equalsByUser(int userId,
int contextId)
userId - The user IDcontextId - The context ID
true this pooled events matches; otherwise falsepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int getContextId()
public int getUserId()
public int getAccountId()
public java.lang.String getFullname()
public com.openexchange.session.Session getSession()
public boolean isContentRelated()
true for a content-related event; otherwise false
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||