|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.cocoon.portal.event.impl.DefaultEventManager
public class DefaultEventManager
This is the default implementation of the event manager.
Nested Class Summary | |
---|---|
protected static class |
DefaultEventManager.MethodInfo
|
Field Summary | |
---|---|
protected ServiceSelector |
aspectSelector
|
protected EventAspectChain |
chain
|
protected Context |
context
|
protected Map |
receiverClasses
Introspected receiver classes |
protected PortalService |
service
The portal service |
Fields inherited from interface org.apache.cocoon.portal.event.EventManager |
---|
ROLE |
Constructor Summary | |
---|---|
DefaultEventManager()
|
Method Summary | |
---|---|
void |
configure(Configuration conf)
|
void |
contextualize(Context context)
|
void |
dispose()
|
protected Map |
getObjectModel()
Helper method to get the current object model |
Publisher |
getPublisher()
Returns the Publisher with which events can be published. |
Register |
getRegister()
Returns the Register with which subscribers can subscribe and unsubscribe interest to given Events. |
void |
initialize()
|
protected List |
introspect(Class receiverClass)
|
void |
processEvents()
Process the events |
void |
publish(Event event)
Publishes an event for subscribers to be informed of. |
void |
send(Event event)
Publish an event. |
void |
service(ServiceManager manager)
|
void |
subscribe(Receiver receiver)
Subscribes a receiver for a specific type of event. |
void |
subscribe(Subscriber subscriber)
Subscribes a Subscriber to the EventManager. |
void |
unsubscribe(Receiver receiver)
Unsubscribes a receiver for all events. |
void |
unsubscribe(Subscriber subscriber)
Unsubscribes an Subscriber from the EventManager. |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected EventAspectChain chain
protected ServiceSelector aspectSelector
protected Context context
protected PortalService service
protected Map receiverClasses
Constructor Detail |
---|
public DefaultEventManager()
Method Detail |
---|
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
Serviceable.service(org.apache.avalon.framework.service.ServiceManager)
public Publisher getPublisher()
EventManager
getPublisher
in interface EventManager
public Register getRegister()
EventManager
getRegister
in interface EventManager
protected Map getObjectModel()
public void configure(Configuration conf) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
public void dispose()
dispose
in interface Disposable
public void initialize() throws Exception
initialize
in interface Initializable
Exception
public void publish(Event event)
Publisher
publish
in interface Publisher
event
- the Event being publishedpublic void subscribe(Subscriber subscriber)
Register
subscribe
in interface Register
subscriber
- the SubscriberSubscriber
public void unsubscribe(Subscriber subscriber)
Register
unsubscribe
in interface Register
subscriber
- the SubscriberSubscriber
public void processEvents() throws ProcessingException
EventManager
processEvents
in interface EventManager
ProcessingException
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
Contextualizable.contextualize(org.apache.avalon.framework.context.Context)
public void send(Event event)
EventManager
send
in interface EventManager
event
- The event to broadcast.EventManager.send(org.apache.cocoon.portal.event.Event)
protected List introspect(Class receiverClass)
public void subscribe(Receiver receiver)
EventManager
subscribe
in interface EventManager
EventManager.subscribe(org.apache.cocoon.portal.event.Receiver)
public void unsubscribe(Receiver receiver)
EventManager
unsubscribe
in interface EventManager
EventManager.unsubscribe(org.apache.cocoon.portal.event.Receiver)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |