home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 October / Chip_1997-10_cd.bin / tema / sybase / powerj / template.z / Session.java < prev    next >
Text File  |  1996-12-09  |  2KB  |  65 lines

  1. /*
  2.  * Session.java
  3.  *
  4.  *
  5.  * Copyright 1996 Sybase, Inc. All rights reserved.
  6.  */
  7.  
  8. /**
  9.  * The Session class provides a way to get/set Session variables.
  10.  * Currently a named string value can be saved as a name=value pair.
  11.  */
  12.  
  13. public class Session
  14. //******************
  15. {
  16.  
  17.     //-------------------------------------------------------------
  18.     // Constructor
  19.     //-------------------------------------------------------------
  20.  
  21.     /**
  22.      * Constructs a new Session object with the specified handle
  23.      * @param handle handle to the WWW server
  24.      */
  25.      
  26.     public Session ( int handle )
  27.     //***************************
  28.     {
  29.         _handle = handle;
  30.     }
  31.     
  32.     
  33.     //-------------------------------------------------------------
  34.     // Public Methods
  35.     //-------------------------------------------------------------
  36.  
  37.     /**
  38.      * Returns the value of the specified variable name
  39.      * @param name name of the variable whose value is to be returned
  40.      * @return value of named variable or null
  41.      * @exception WebServiceException If the handle to the WWW server is invalid
  42.      */
  43.  
  44.     public native String getValue( String name ) throws WebServiceException;
  45.     //*********************************************************************
  46.  
  47.     /**
  48.      * Sets the named variable to the value specified
  49.      * @param name name of the variable
  50.      * @param value value of the variable 
  51.      * @exception WebServiceException If the handle to the WWW server is invalid
  52.      */
  53.      
  54.     public native boolean setValue( String name, String value )
  55.      throws WebServiceException;
  56.     //*********************************************************
  57.  
  58.  
  59.     //-------------------------------------------------------------
  60.     // Data
  61.     //-------------------------------------------------------------
  62.     
  63.     private int _handle;         // handle to WebService
  64. }
  65.