com.sun.sgs.auth
Interface Identity


public interface Identity

This interface represents a single identity in a form used only by Services, the kernel, and other system-level components. Implementations must also implement Serializable, equals, and hashCode.

While instances of Identity may be used by Services and other components to manage users or task ownership (including serializing and persisting Identitys), this interface is really a means for communicating with the accounting and management system. As such, any combinations of calls to notifyLoggedIn and notifyLoggedOut are valid. Note that an application may still enforce that its users are not allowed to login multiple times, or may only logout if they are logged in.


Method Summary
 String getName()
          Returns the name associated with this identity.
 void notifyLoggedIn()
          Notifies the system that this identity has logged in.
 void notifyLoggedOut()
          Notifies the system that this identity has logged out.
 

Method Detail

getName

String getName()
Returns the name associated with this identity. This name must be unique within the application, and two identities with the same name must be equal.

Returns:
the identity's name

notifyLoggedIn

void notifyLoggedIn()
Notifies the system that this identity has logged in. Typically this is done shortly after authenticating the identity. Note that it is valid to authenticate an identity that does not log into the system.


notifyLoggedOut

void notifyLoggedOut()
Notifies the system that this identity has logged out. Typically this is done after a client disconnects from the system.


RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved