|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
org.benow.web.subscription.SubscriptionHandler
public abstract class SubscriptionHandler
A subscription handler bridges between repository notifications and subscriptions. Subscribed objects are registered (notifyFor(PersistentObject)) and notification of a required subscription event are triggered (doNotify()). The actual response for the subscription is left to the implementors.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
SubscriptionHandler(java.lang.Class<?>[] subscribedClasses)
|
|
| Method Summary | |
|---|---|
protected abstract void |
doNotify(org.benow.security.user.User user,
org.benow.repository.util.PersistentObject obj)
Called when the object has changed and notification is to take place |
protected void |
init(java.lang.Class<?>[] subscribedClasses)
initialize the handler by fetching and adding all subscriptions |
void |
notifyFor(org.benow.repository.util.PersistentObject obj)
|
void |
onNotify(org.benow.java.notify.condition.NotificationSource source,
org.benow.java.notify.condition.NotificationCondition condition)
|
void |
run()
|
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SubscriptionHandler(java.lang.Class<?>[] subscribedClasses)
| Method Detail |
|---|
protected void init(java.lang.Class<?>[] subscribedClasses)
subscribedClasses - public void run()
run in interface java.lang.Runnablerun in class java.lang.Thread
protected abstract void doNotify(org.benow.security.user.User user,
org.benow.repository.util.PersistentObject obj)
user - obj -
public void onNotify(org.benow.java.notify.condition.NotificationSource source,
org.benow.java.notify.condition.NotificationCondition condition)
onNotify in interface org.benow.java.notify.condition.NotificationListenerpublic void notifyFor(org.benow.repository.util.PersistentObject obj)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||