/*
 * Created on 2004-7-19
 *
 * To change the template for this generated file go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
package workflow.client;

import workflow.WorkflowException;
import workflow.live.LiveService;

/**
 * @author reic
 *
 * To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
public interface LiveClient extends MatrixClient
{
	/**
	 *
	 * Returns a string containing the unique identifier assigned 
	 * to this session. The identifier is assigned 
	 * by the servlet container and is implementation dependent.
	 * 
	 * @return				a string specifying the identifier
	 *					assigned to this session
	 *
	 * @exception IllegalStateException	if this method is called on an
	 *					invalidated session
	 *
	 */

	public String getSessionID() throws WorkflowException;

 /**
	* Returns the maximum time interval (in seconds) that 
	* the workflow engine will keep this session open between 
	* client accesses. After this interval, the workflow engine
	* will invalidate the session.  The maximum time interval can be set
	* with the <code>setMaxInactiveInterval</code> method.
	* A negative time indicates the session should never timeout.
	*  
	*
	* @return		an integer specifying the number of
	*			seconds this session remains open
	*			between client requests
	*
	* @see		#setMaxInactiveInterval
	*
	*/

	public int getMaxInactiveInterval()throws WorkflowException;
	
	/**
	 * Specifies the time (in seconds) between client requests before the 
	 * workflow engine will invalidate this session.  A negative time
	 * indicates the session should never timeout.
	 *
	 * @param interval		An integer specifying the number
	 * 				of seconds 
	 *
	 */
	public void setMaxInactiveInterval(int interval)throws WorkflowException;

	/**
	 * Update the accessed time information for this session. 
	 */
	public void keepAlive() throws WorkflowException;

	/**
	 *
	 * disconnect from workflow engine and invalidates this session 
	 * then unbinds any objects bound to it.
	 */
	public void disconnect() throws WorkflowException;

	public LiveService findService(String serviceName) throws WorkflowException;
	public LiveService[] findServices() throws WorkflowException;
}
