org.marketcetera.util.ws.stateful
Class AuthServiceImpl<T>

java.lang.Object
  extended by org.marketcetera.util.ws.stateless.StatelessServiceBaseImpl
      extended by org.marketcetera.util.ws.stateful.ServiceBaseImpl<T>
          extended by org.marketcetera.util.ws.stateful.AuthServiceImpl<T>
All Implemented Interfaces:
AuthService, ServiceBase, StatelessServiceBase

public class AuthServiceImpl<T>
extends ServiceBaseImpl<T>
implements AuthService

An authentication service implementation.

Since:
1.0.0
Version:
$Id: AuthServiceImpl.java 16154 2012-07-14 16:34:05Z colin $
Author:
tlerios@marketcetera.com

Constructor Summary
AuthServiceImpl(Authenticator authenticator, SessionManager<T> sessionManager)
          Creates a new authentication service implementation with the given authenticator and session manager.
 
Method Summary
 Authenticator getAuthenticator()
          Returns the receiver's authenticator.
 SessionId login(StatelessClientContext context, String user, char[] password)
          Logs in the client with the given context, provided the given credentials are acceptable.
 void logout(ClientContext context)
          Logs out the client with the given context.
 
Methods inherited from class org.marketcetera.util.ws.stateful.ServiceBaseImpl
getSessionManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthServiceImpl

public AuthServiceImpl(Authenticator authenticator,
                       SessionManager<T> sessionManager)
Creates a new authentication service implementation with the given authenticator and session manager.

Parameters:
authenticator - The authenticator.
sessionManager - The session manager.
Method Detail

getAuthenticator

public Authenticator getAuthenticator()
Returns the receiver's authenticator.

Returns:
The authenticator.

login

public SessionId login(StatelessClientContext context,
                       String user,
                       char[] password)
                throws RemoteException
Description copied from interface: AuthService
Logs in the client with the given context, provided the given credentials are acceptable.

Specified by:
login in interface AuthService
Parameters:
context - The context.
user - The user name.
password - The password. Upon return, its contents are cleared (on the server) by overwriting all prior characters with the nul ('\0') character.
Returns:
The ID of the new session.
Throws:
RemoteException - Thrown if the operation cannot be completed.

logout

public void logout(ClientContext context)
            throws RemoteException
Description copied from interface: AuthService
Logs out the client with the given context. This method is a no-op if there is no active session for that client.

Specified by:
logout in interface AuthService
Parameters:
context - The context.
Throws:
RemoteException - Thrown if the operation cannot be completed.


Copyright © 2012. All Rights Reserved.