com.tensegrity.palowebviewer.modules.engine.client
Class Engine

java.lang.Object
  extended by com.tensegrity.palowebviewer.modules.engine.client.Engine
All Implemented Interfaces:
IEngine

public class Engine
extends java.lang.Object
implements IEngine

Implements IEngine


Constructor Summary
Engine()
          Constructs Engine
 
Method Summary
 void addAuthenticateListener(IAuthListener authListener)
          Adds engine authentication listener
 void addErrorListener(IErrorListener errorListener)
          Adds engine error listener
 void addRequestListener(IRequestListener listener)
           
 void authenticate()
          Async function.
 void authenticate(java.lang.String login, java.lang.String password, boolean remember)
          Async function.
protected  void fireLoginFailed(java.lang.String message)
          Notifies listener that login operation failed.
protected  void fireLoginSuccess()
          Notifies listener that login operation succeeded
protected  void fireLogoff()
          Notifies listener that log off operation succeeded.
protected  void fireOnError(java.lang.Throwable caught)
          Notifies listener that there was an error.
 IClientProperties getClientProperties()
           
 IPaloServerModel getPaloServerModel()
          Get PaloServerModel
 IUserMessageQueue getUserMessageQueue()
           
 void logout()
          Get login action source
 void removeAuthenticateListener(IAuthListener authListener)
          Remove engine authentication listener
 void removeErrorListener(IErrorListener errorListener)
          Remove engine error listener
 void removeRequestListener(IRequestListener listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Engine

public Engine()
Constructs Engine

Method Detail

addAuthenticateListener

public void addAuthenticateListener(IAuthListener authListener)
Adds engine authentication listener

Specified by:
addAuthenticateListener in interface IEngine

removeAuthenticateListener

public void removeAuthenticateListener(IAuthListener authListener)
Remove engine authentication listener

Specified by:
removeAuthenticateListener in interface IEngine

addErrorListener

public void addErrorListener(IErrorListener errorListener)
Adds engine error listener

Specified by:
addErrorListener in interface IEngine

removeErrorListener

public void removeErrorListener(IErrorListener errorListener)
Remove engine error listener

Specified by:
removeErrorListener in interface IEngine

getPaloServerModel

public IPaloServerModel getPaloServerModel()
Get PaloServerModel

Specified by:
getPaloServerModel in interface IEngine

authenticate

public void authenticate()
Async function. Check if user authenticated. Lookup for user credentials in session and cookies

Specified by:
authenticate in interface IEngine

authenticate

public void authenticate(java.lang.String login,
                         java.lang.String password,
                         boolean remember)
Async function. Authenticate user with login and password

Specified by:
authenticate in interface IEngine
Parameters:
login - - user login
password - - password
remember - - store login and password in cookies

fireOnError

protected void fireOnError(java.lang.Throwable caught)
Notifies listener that there was an error.

Parameters:
caught - - an error that occurred.

fireLoginSuccess

protected void fireLoginSuccess()
Notifies listener that login operation succeeded


fireLogoff

protected void fireLogoff()
Notifies listener that log off operation succeeded.


fireLoginFailed

protected void fireLoginFailed(java.lang.String message)
Notifies listener that login operation failed.

Parameters:
message - - reason why login failed.

logout

public void logout()
Description copied from interface: IEngine
Get login action source

Specified by:
logout in interface IEngine

getClientProperties

public IClientProperties getClientProperties()
Specified by:
getClientProperties in interface IEngine

addRequestListener

public void addRequestListener(IRequestListener listener)
Specified by:
addRequestListener in interface IEngine

removeRequestListener

public void removeRequestListener(IRequestListener listener)
Specified by:
removeRequestListener in interface IEngine

getUserMessageQueue

public IUserMessageQueue getUserMessageQueue()
Specified by:
getUserMessageQueue in interface IEngine