home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-12-09 | 2.4 KB | 76 lines |
- /*
- * Session.java
- *
- *
- * Copyright 1996 Sybase, Inc. All rights reserved.
- */
-
- /**
- * <P>The Session class provides an interface to the NetImpact Dynamo session.
- *
- * <P>A Dynamo session supports methods to set or get string values,
- * which are associated by Dynamo to a current browser session.
- *
- * <P>Lifetime: created from DynamoConnection.getSession()
- * Note that a public variable called session will be predefined for
- * each Java servlet, in the runtime startup.
- * The session object is part of the Java servlet and will be lost when
- * the servlet finishes; however, Dynamo will save session values set with
- * session.setValue() for up to 5 minutes. Another servlet can access those
- * values if accessed from the same browser within that time limit.
- *
- * <P>See SQL Anywhere documentation on NetImpact Dynamo for a description
- * of the session object.
- */
-
-
- public class Session extends DynamoConnection
- //*******************************************
- {
-
- //-------------------------------------------------------------
- // Constructor
- //-------------------------------------------------------------
-
- /**
- * Constructs a new Session object with the specified handle
- * @param handle handle to Dynamo client
- */
-
- public Session(int handle)
- //***********************
- {
- super();
- setHandle(handle);
- }
-
-
- //-------------------------------------------------------------
- // Public Methods
- //-------------------------------------------------------------
-
- /**
- * Returns the value of the specified variable name
- * @param variable name of the variable whose value is to be returned
- * @return value of named variable or null
- * @exception DynamoException If the handle to Dynamo is invalid
- */
-
- public native String getValue(String variable) throws DynamoException;
- //*******************************************************************
-
- /**
- * Sets the named variable to the value specified
- * @param name name of the variable
- * @param value value of the variable
- * @return true for success; false otherwise
- * @exception DynamoException If the handle to Dynamo is invalid
- */
-
- public native boolean setValue(String variable, String value)
- throws DynamoException;
- //***********************************************************
-
- };
-
-