org.apache.cocoon.auth.impl
Class LoginInfo

java.lang.Object
  extended byorg.apache.cocoon.auth.impl.LoginInfo
All Implemented Interfaces:
Serializable

public class LoginInfo
extends Object
implements Serializable

This class keeps track of the number of applications a user is logged into using the same security handler.

Version:
$Id: LoginInfo.html 1304280 2012-03-23 11:18:01Z ilgrosso $
See Also:
Serialized Form

Field Summary
protected  List applications
          The applications the user is logged in to.
protected  int counter
          Number of applications using the security handler.
protected  org.apache.cocoon.auth.User user
          The corresponding user.
 
Constructor Summary
LoginInfo(org.apache.cocoon.auth.User aUser)
          Instantiate new info object.
 
Method Summary
 void decUsageCounter(String appName)
          Notification of an application that is not using the handler anymore.
 List getApplications()
          Return the list of all applications.
 org.apache.cocoon.auth.User getUser()
          Return the corresponding user.
 void incUsageCounter(String appName)
          Notification of another application using the handler.
 boolean isUsed()
          Is the handler used by any application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

counter

protected int counter
Number of applications using the security handler.


user

protected final org.apache.cocoon.auth.User user
The corresponding user.


applications

protected List applications
The applications the user is logged in to.

Constructor Detail

LoginInfo

public LoginInfo(org.apache.cocoon.auth.User aUser)
Instantiate new info object.

Parameters:
aUser - The user object returned by the security handler.
Method Detail

incUsageCounter

public void incUsageCounter(String appName)
Notification of another application using the handler.

Parameters:
appName - The application name.

decUsageCounter

public void decUsageCounter(String appName)
Notification of an application that is not using the handler anymore.

Parameters:
appName - The application name.

isUsed

public boolean isUsed()
Is the handler used by any application.

Returns:
true if it's used, otherwise false.

getUser

public org.apache.cocoon.auth.User getUser()
Return the corresponding user.

Returns:
The user generated by the security handler.

getApplications

public List getApplications()
Return the list of all applications.

Returns:
The list containing all applications this user is logged in to.


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.