org.instrumentmiddleware.cima.session
Interface ISessionManager

All Superinterfaces:
org.springframework.context.ApplicationEventPublisherAware
All Known Implementing Classes:
SessionManager

public interface ISessionManager
extends org.springframework.context.ApplicationEventPublisherAware

The ISessionManager should publish a SessionEvent for every successful session addition and removal. Clients wishing to be notified of these events must implement the ApplicationListener interface and check the event type when notified. For example:

import org.instrumentmiddleware.cima.event.SessionEvent;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;

public class RegistrationEventListener implements ApplicationListener {
        public void onApplicationEvent(ApplicationEvent event) {
                if (event instanceof SessionEvent) {
                        // do something useful
                }
        }
}

Author:
andrew

Method Summary
 void addSession(ISession session)
           
 IRegisteredParcel createRegisteredParcel(IPlugin plugin, org.instrumentmiddleware.cima.parcel.ParcelDocument.Parcel parcel)
          create a parcel that knows who it needs to be delivered to
 ISession createSession(ICIMAPlugin plugin, org.instrumentmiddleware.cima.parcel.EntityType subscriber)
           
 ISession createSession(java.lang.String sessionId, ICIMAPlugin plugin, org.instrumentmiddleware.cima.parcel.EntityType subscriber)
           
 ISession getSession(java.lang.String sessionId)
           
 java.util.List<ISession> getSessions(IPlugin key)
           
 ISession removeSession(java.lang.String sessionId)
           
 
Methods inherited from interface org.springframework.context.ApplicationEventPublisherAware
setApplicationEventPublisher
 

Method Detail

createSession

ISession createSession(ICIMAPlugin plugin,
                       org.instrumentmiddleware.cima.parcel.EntityType subscriber)
                       throws java.lang.Exception
Throws:
java.lang.Exception

createSession

ISession createSession(java.lang.String sessionId,
                       ICIMAPlugin plugin,
                       org.instrumentmiddleware.cima.parcel.EntityType subscriber)
                       throws java.lang.Exception
Throws:
java.lang.Exception

addSession

void addSession(ISession session)

getSession

ISession getSession(java.lang.String sessionId)

removeSession

ISession removeSession(java.lang.String sessionId)

getSessions

java.util.List<ISession> getSessions(IPlugin key)

createRegisteredParcel

IRegisteredParcel createRegisteredParcel(IPlugin plugin,
                                         org.instrumentmiddleware.cima.parcel.ParcelDocument.Parcel parcel)
create a parcel that knows who it needs to be delivered to

Parameters:
parcel -
Returns:
the smart parcel


Copyright © 2008. All Rights Reserved.