Class CoherenceSessionCreatedEventHandler
- java.lang.Object
-
- com.oracle.coherence.spring.session.events.CoherenceSessionCreatedEventHandler
-
- All Implemented Interfaces:
com.tangosol.net.events.EventDispatcherAwareInterceptor<com.tangosol.net.events.partition.cache.EntryEvent<String,org.springframework.session.MapSession>>
,com.tangosol.net.events.EventInterceptor<com.tangosol.net.events.partition.cache.EntryEvent<String,org.springframework.session.MapSession>>
public class CoherenceSessionCreatedEventHandler extends Object implements com.tangosol.net.events.EventDispatcherAwareInterceptor<com.tangosol.net.events.partition.cache.EntryEvent<String,org.springframework.session.MapSession>>
Custom Event that handles the creation of a session. The handled event is then propagated as a Spring application event via Spring'sApplicationEventPublisher
.- Since:
- 3.0
- Author:
- Gunnar Hillert
-
-
Constructor Summary
Constructors Constructor Description CoherenceSessionCreatedEventHandler(ApplicationEventPublisher eventPublisher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
introduceEventDispatcher(String sIdentifier, com.tangosol.net.events.EventDispatcher dispatcher)
void
onEvent(com.tangosol.net.events.partition.cache.EntryEvent<String,org.springframework.session.MapSession> event)
protected String
removeScope(String serviceName)
Remove the scope prefix from a specified service name.void
setCacheName(String cacheName)
void
setScopeName(String scopeName)
void
setServiceName(String serviceName)
-
-
-
Constructor Detail
-
CoherenceSessionCreatedEventHandler
public CoherenceSessionCreatedEventHandler(ApplicationEventPublisher eventPublisher)
-
-
Method Detail
-
introduceEventDispatcher
public void introduceEventDispatcher(String sIdentifier, com.tangosol.net.events.EventDispatcher dispatcher)
- Specified by:
introduceEventDispatcher
in interfacecom.tangosol.net.events.EventDispatcherAwareInterceptor<com.tangosol.net.events.partition.cache.EntryEvent<String,org.springframework.session.MapSession>>
-
onEvent
public void onEvent(com.tangosol.net.events.partition.cache.EntryEvent<String,org.springframework.session.MapSession> event)
- Specified by:
onEvent
in interfacecom.tangosol.net.events.EventInterceptor<com.tangosol.net.events.partition.cache.EntryEvent<String,org.springframework.session.MapSession>>
-
removeScope
protected String removeScope(String serviceName)
Remove the scope prefix from a specified service name.- Parameters:
serviceName
- the service name to remove scope prefix from- Returns:
- service name with scope prefix removed
-
setCacheName
public void setCacheName(String cacheName)
-
setScopeName
public void setScopeName(String scopeName)
-
setServiceName
public void setServiceName(String serviceName)
-
-