org.codehaus.wadi.core.manager
Interface Manager

All Superinterfaces:
Lifecycle
All Known Implementing Classes:
ClusteredManager, DistributableManager, StandardManager

public interface Manager
extends Lifecycle

Manager - A Session Manager abstraction. Responsibilities include Session creation, destruction, storage and the processing of Invocations in the presence of the Session.

Version:
$Revision$
Author:
Jules Gosnell

Field Summary
static ServiceName NAME
           
 
Method Summary
 boolean contextualise(Invocation invocation)
          Contextualise an Invocation - somehow colocate the Invocation and the relevant Session within the same JVM somewhere in the Cluster, give the Invocation the Session and invoke() it.
 Session create(Invocation invocation)
          Create a new Session
 Session createWithName(java.lang.String name)
           
 void destroy(Session session)
          Destroy a Session
 int getMaxInactiveInterval()
           
 SessionIdFactory getSessionIdFactory()
           
 void init(ManagerConfig config)
          Initialise the Manager with information not readily available at construction time.
 void setMaxInactiveInterval(int interval)
           
 
Methods inherited from interface org.codehaus.wadi.core.Lifecycle
start, stop
 

Field Detail

NAME

static final ServiceName NAME
Method Detail

init

void init(ManagerConfig config)
Initialise the Manager with information not readily available at construction time.

Parameters:
config - An object carrying configuration informations

createWithName

Session createWithName(java.lang.String name)
                       throws SessionAlreadyExistException
Throws:
SessionAlreadyExistException

create

Session create(Invocation invocation)
Create a new Session

Parameters:
invocation - the Invocation
Returns:
the Session

destroy

void destroy(Session session)
Destroy a Session

Parameters:
session - the Session

getMaxInactiveInterval

int getMaxInactiveInterval()
Returns:
The maximum amount of time (in seconds) that a Session may lie inactive (i.e. without receiving an Invocation) before it should be garbage collected.

setMaxInactiveInterval

void setMaxInactiveInterval(int interval)
Parameters:
The - maximum amount of time (in seconds) that a Session may lie inactive (i.e. without receiving an Invocation) before it should be garbage collected.

getSessionIdFactory

SessionIdFactory getSessionIdFactory()
Returns:
The factory responsible for the generation of Session IDs

contextualise

boolean contextualise(Invocation invocation)
                      throws InvocationException
Contextualise an Invocation - somehow colocate the Invocation and the relevant Session within the same JVM somewhere in the Cluster, give the Invocation the Session and invoke() it. The Manager possesses a stack of Contextualisers, down which the Invocation is passed in order to achieve this.

Parameters:
invocation -
Throws:
InvocationException


Copyright © 2008. All Rights Reserved.