ome.system
Class SessionInitializer

java.lang.Object
  extended by ome.system.SessionInitializer

public class SessionInitializer
extends Object

Manages the creation of a single Session created via the injected ISession service. This is used for by the client-side ServiceFactory. Each instance synchronizes on an internal mutex during every call to #getSessionId() and #setSessionId(String)

Author:
Josh Moore, josh at glencoesoftware.com

Field Summary
protected  String credentials
           
protected  Object mutex
           
protected  Principal principal
          Principal given by the user
protected  ome.model.meta.Session session
           
protected  ISession sessions
           
 
Constructor Summary
SessionInitializer()
           
 
Method Summary
 Principal createPrincipal()
           
 ome.model.meta.Session getSession()
           
 boolean hasSession()
           
 void setCredentials(String securityCredentials)
           
 void setPrincipal(Principal principal)
           
 void setSession(ome.model.meta.Session s)
           
 void setSessionService(ISession service)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mutex

protected Object mutex

principal

protected Principal principal
Principal given by the user


credentials

protected String credentials

session

protected ome.model.meta.Session session

sessions

protected ISession sessions
Constructor Detail

SessionInitializer

public SessionInitializer()
Method Detail

setSessionService

public void setSessionService(ISession service)

setPrincipal

public void setPrincipal(Principal principal)

setCredentials

public void setCredentials(String securityCredentials)

hasSession

public boolean hasSession()

getSession

public ome.model.meta.Session getSession()

setSession

public void setSession(ome.model.meta.Session s)

createPrincipal

public Principal createPrincipal()


OmeroJava Api

Version: 4.3.4-dbcbce5a-b4

Copyright © 2009 The University of Dundee. All Rights Reserved.