|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectibspan.tss.agents.sha.history.HistorySubscriptionManager
public class HistorySubscriptionManager
This class deals with the registration/deregistration of subscriptions for
packs of events, delegated to it by SubscriptionManager
object
and creates notifications containing information about new events., when
required by HistoryLogger
. This functionality result from the
interface this class implements.
The class uses internal not-persistent knowledge-base for storing constraints of registered subscription and every time this contraints of particular subscription are fulfilled (number of new events is equal for which the subscriber subscribed), then sends notification message to the appriopriate subscriber.
SubscriptionResponder.SubscriptionManager
,
HistoryLogger
Constructor Summary | |
---|---|
HistorySubscriptionManager(Agent a,
HistoryDAO daoHistory)
Constructs HistorySubscriptionManger belongs to . |
Method Summary | |
---|---|
boolean |
deregister(SubscriptionResponder.Subscription sub)
Deregister a Subscription object from the knowledge-base.. |
void |
handleNewEvent(Event e)
Notifies subscriber every time number events, together with the passed as argument, is equal to the number contrained by the subscriber in registration message. |
boolean |
register(SubscriptionResponder.Subscription sub)
Register a new Subscription object in the knowledge-base. |
void |
setContentManager(ContentManager cm)
Set the content manager for this component. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HistorySubscriptionManager(Agent a, HistoryDAO daoHistory)
HistorySubscriptionManger belongs to
.
a
- is the agent this
HistorySubscriptionManger belongs to
.daoHistory
- DAO object of History model, which will be used to
extract information about events, the subscriber is willing to
be informed about.Method Detail |
---|
public void setContentManager(ContentManager cm)
cm
- is a content manager.public boolean deregister(SubscriptionResponder.Subscription sub) throws FailureException
deregister
in interface SubscriptionResponder.SubscriptionManager
s
- The Subscription object to be registered
SubscriptionResponder
about whether or not
an INFORM message should be sent back to the initiator. The
default implementation of the handleCancel()
method of the SubscriptionResponder
ignores this
indication, but programmers can override it.
FailureException
public boolean register(SubscriptionResponder.Subscription sub) throws RefuseException, NotUnderstoodException
register
in interface SubscriptionResponder.SubscriptionManager
s
- The Subscription object to be registered
SubscriptionResponder
about whether or not
an AGREE message should be sent back to the initiator. The
default implementation of the prepareResponse
method of the SubscriptionResponder
ignores this
indication, but programmers can override it.
RefuseException
NotUnderstoodException
public void handleNewEvent(Event e)
handleNewEvent
in interface NewEventHandler
e
- is the event to be handled.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |