| java.lang.Object com.tcspring.ApplicationContextEventProtocol
ApplicationContextEventProtocol | public class ApplicationContextEventProtocol (Code) | | Manages the event multicast of ApplicationContext events. Preserves the context's ID, e.g. a multicast is a multicast
only to the same "logical" contexts in the cluster (and its parents).
author: Jonas Bonér author: Eugene Kuleshov |
Method Summary | |
public Object | interceptEvent(StaticJoinPoint jp, ApplicationEvent event, AbstractApplicationContext ctx) Intercepts the sending of a spring ApplicationContext event, this advice captures it and
tries to publish it as a distributed event. | public void | multicastEvent(String ctxId, ApplicationEvent event) [Distributed Method Invocation]
1. | public void | registerContext(StaticJoinPoint jp, AbstractApplicationContext ctx) Puts all clustered ApplicationContext instances into a node local HashMap . | public String | toString() | public boolean | tryToPublishDistributedEvent(BeanFactory beanFactory, ApplicationEvent event) Tries to publish the event as a distributed event, by invoking a distributed method invocation. |
interceptEvent | public Object interceptEvent(StaticJoinPoint jp, ApplicationEvent event, AbstractApplicationContext ctx) throws Throwable(Code) | | Intercepts the sending of a spring ApplicationContext event, this advice captures it and
tries to publish it as a distributed event.
Invoked around void org.springframework.context.support.AbstractApplicationContext.publishEvent(..)
|
multicastEvent | public void multicastEvent(String ctxId, ApplicationEvent event)(Code) | | [Distributed Method Invocation]
1. Gets the context by ID - needed since the DMI is invoked on another node and
need to look up [it's context].
2. Publish event in the context matching the ID
|
registerContext | public void registerContext(StaticJoinPoint jp, AbstractApplicationContext ctx)(Code) | | Puts all clustered ApplicationContext instances into a node local HashMap .
Puts itself (the aspect) into a shared map, this is needed for DMI to work.
Puts some additional information into the aspect to be displayed as a regular info in the terracotta console.
Advises:
before(
withincode(* org.springframework.context.support.AbstractApplicationContext+.refresh())
AND call(* org.springframework.context.support.AbstractApplicationContext+.publishEvent(..))
AND target(ctx))
|
tryToPublishDistributedEvent | public boolean tryToPublishDistributedEvent(BeanFactory beanFactory, ApplicationEvent event)(Code) | | Tries to publish the event as a distributed event, by invoking a distributed method invocation.
|
|
|