Author: keith
Date: Sun Jan 27 22:17:03 2008
New Revision: 13024

Log:

Updating sessionHostObject



Modified:
   trunk/mashup/java/xdocs/sessionhostobject.html

Modified: trunk/mashup/java/xdocs/sessionhostobject.html
==============================================================================
--- trunk/mashup/java/xdocs/sessionhostobject.html      (original)
+++ trunk/mashup/java/xdocs/sessionhostobject.html      Sun Jan 27 22:17:03 2008
@@ -1,97 +1,158 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
-    <meta http-equiv="content-type" content="">
 
-    <title>Session Host Object</title>
-    <link href="styles.css" rel="stylesheet" type="text/css" media="all">
+  <meta http-equiv="content-type" content="">
+  <title>Session Host Object</title>
+
+
+  <link href="styles.css" rel="stylesheet" type="text/css" media="all">
+
 </head>
 
+
 <body>
+
 <div id="main-content">
-    <h1>Session Host Object</h1>
+<h1>Session Host Object</h1>
+
+<h3> 1.0 Introduction</h3>
+
+<p>The 'session' hosted object provides the ability for the users
+to share objects across different service invocations. The session
+object is global and thus does not need to be instantiated explicitly.</p>
 
-    <h3>
-        1.0 Introduction</h3>
+<h3>1.1 Example</h3>
+
+<div class="code">
+<pre>this.serviceName = 
"ApplicationScopeService";<br>this.scope="application";<br>var key = 
"number";<br>function putValue(param){<br>        session.put(key,2);<br> 
return &lt;success/&gt;;<br>}<br><br>function getValue(param){<br>      number 
= session.get(key);<br>  return 
&lt;number&gt;{number}&lt;/number&gt;;<br>}<br><br>function 
removeValue(param){<br>      number = session.remove(key);<br>       return 
&lt;success/&gt;;<br>}<br><br>function clearSession(param){<br>  
session.clear();<br>    return &lt;success/&gt;;<br>}</pre>
 
-    <p>The 'session' hosted object provides the ability for the users to
-        share objects across different service invocations. The session object
-        is global and thus does not need to be instantiated explicitly.</p>
-
-    <h3>1.1 Example</h3>
-
-    <div class="code">
-        <pre>this.serviceName = 
"ApplicationScopeService";<br/>this.scope="application";<br/>var key = 
"number";<br/>function putValue(param){<br/>    session.put(key,2);<br/>        
return &lt;success/&gt;;<br/>}<br/><br/>function getValue(param){<br/>  number 
= session.get(key);<br/> return 
&lt;number&gt;{number}&lt;/number&gt;;<br/>}</pre>
-    </div>
-
-    <h3>2.0 Session Object</h3>
-
-    <p>Session scope for a deployed mashup can be given using the "scope"
-        service property annotation. Following are the set of supported 
scopes.</p>
-
-    <p>&nbsp;&nbsp;&nbsp; <b>'request'</b> -&nbsp; The state date stored in 
the session object will
-        be <b><em>available only for the current invocation</em></b> of the 
service. In other words
-        the session object has no effect in this scope.</p>
-
-    <p>&nbsp;&nbsp;&nbsp; <b>'transportsession'</b> -&nbsp; The state date 
stored in the session
-        object will be <b><em>available only for the</em></b> <b><em>life time 
of the transport
-        session</em></b> used for invoking this service. This can be used to 
store data across
-        invocations for a specific client.</p>
-
-    <p>&nbsp;&nbsp;&nbsp; '<b>application</b>'&nbsp; - The state date stored 
in the session object
-        will be <b><em>available throughout the life time</em></b> of the 
service.</p>
-
-    <p>&nbsp;&nbsp;&nbsp; <b>'soapsession'</b> -&nbsp; WS-Addressing is 
required for this. <font
-            color="#ff0000"><b>&lt; Not Implemented as yet &gt;</b></font><br/>
-        &nbsp;&nbsp;</p>
-
-    <p>By default, Mashup services deployed in the WSO2 Mashup Server are 
running in the "request"
-        scope.</p>
-
-    <h3>2.1 Session Object Interface</h3>
-
-    <p>{ &nbsp;<br/>
-        &nbsp;&nbsp;&nbsp; function void put(key,object);<br/>
-        &nbsp;&nbsp;&nbsp; function object get(key);<br/>
-        }</p>
-
-    <h3>2.2 API Documentation&nbsp;</h3>
-
-    <table class="MsoTableGrid" style="margin-left: 0.5in; border-collapse: 
collapse;" border="1"
-           cellpadding="5" cellspacing="0">
-        <tbody>
-            <tr>
-                <td> Member</td>
-                <td> Description</td>
-                <td> Supported in version</td>
-            </tr>
-            <tr>
-                <td><b>void put(key,object);</b></td>
-                <td> Puts the key value pair in to the session object. This 
pair will be available
-                    for the service invocations across the session. <br 
clear="all">
-                    <em>&nbsp;&nbsp;&nbsp; session.put("name", "WSO2 Mashup 
Server");</em></td>
-                <td> 0.1</td>
-            </tr>
-            <tr>
-                <td><b>object get(key);</b></td>
-                <td> Retrieves the value associated with the given "key" from 
the current session
-                    object. <br clear="all">
-                    <em>&nbsp;&nbsp;&nbsp; session.get("name");&nbsp;</em></td>
-                <td> 0.1</td>
-            </tr>
-        </tbody>
-    </table>
-
-    <h3><a name="SessionHostObject-3.0References"></a>3.0 References</h3>
-
-    <ul>
-        <li><a 
href="http://www.wso2.org/wiki/display/mashup/Javascript+Web+Service+Annotations";
-               title="Javascript Web Service Annotations">Javascript Web 
Service Annotations</a>
-        </li>
-        <li><a 
href="apidocs/org/wso2/mashup/hostobjects/session/SessionHostObject.html">JavaDoc
 for
-            the session host Object</a></li>
-    </ul>
 </div>
-<p>&copy; WSO2 Inc.</p>
+
+<h3>2.0 Session Object</h3>
+
+<p>Session scope for a deployed mashup can be given using the
+"scope" service property annotation. Following are the set of supported
+scopes.</p>
+
+<p>&nbsp;&nbsp;&nbsp; <b>'request'</b>
+-&nbsp; The state date stored in the session object will be <b><em>available
+only for the current invocation</em></b> of the service. In
+other words the session object has no effect in this scope.</p>
+
+<p>&nbsp;&nbsp;&nbsp; <b>'transportsession'</b>
+-&nbsp; The state date stored in the session object will be <b><em>available
+only for the</em></b> <b><em>life time of the
+transport session</em></b> used for invoking this service.
+This can be used to store data across invocations for a specific client.</p>
+
+<p>&nbsp;&nbsp;&nbsp; '<b>application</b>'&nbsp;
+- The state date stored in the session object will be <b><em>available
+throughout the life time</em></b> of the service.</p>
+
+<p>&nbsp;&nbsp;&nbsp; <b>'soapsession'</b>
+-&nbsp; WS-Addressing is required for this. <font color="#ff0000"><b>&lt; Not 
Implemented as yet
+&gt;</b></font><br>
+
+&nbsp;&nbsp;</p>
+
+<p>By default, Mashup services deployed in the WSO2 Mashup Server
+are running in the "request" scope.</p>
+
+<h3>2.1 Session Object Interface</h3>
+
+<p>{ &nbsp;<br>
+
+&nbsp;&nbsp;&nbsp; function void put(key,object);<br>
+
+&nbsp;&nbsp;&nbsp; function object get(key);<br>
+
+&nbsp;&nbsp;&nbsp; function void remove(key);<br>
+
+&nbsp;&nbsp;&nbsp; function void clear();<br>
+
+}</p>
+
+<h3>2.2 API Documentation&nbsp;</h3>
+
+<table class="MsoTableGrid" style="margin-left: 0.5in; border-collapse: 
collapse;" border="1" cellpadding="5" cellspacing="0">
+
+  <tbody>
+
+    <tr>
+
+      <td> Member</td>
+
+      <td> Description</td>
+
+      <td> Supported in version</td>
+
+    </tr>
+
+    <tr>
+
+      <td><b>void put(key,object);</b></td>
+
+      <td> Puts the key value pair in to the session object. This
+pair will be available for the service invocations across the session. <br 
clear="all">
+
+      <em>&nbsp;&nbsp;&nbsp; session.put("name",
+"WSO2 Mashup Server");</em></td>
+
+      <td> 0.1</td>
+
+    </tr>
+
+    <tr>
+
+      <td><b>object get(key);</b></td>
+
+      <td> Retrieves the value associated with the given "key"
+from the current session object. <br clear="all">
+
+      <em>&nbsp;&nbsp;&nbsp;
+session.get("name");&nbsp;</em></td>
+
+      <td> 0.1</td>
+
+    </tr>
+    <tr>
+      <td><b>void remove(key);</b></td>
+      <td> Removes the value associated with the given "key"
+from the current session object. <br clear="all">
+
+      <em>&nbsp;&nbsp;&nbsp;
+session.remove("name");&nbsp;</em></td>
+      <td>1.0</td>
+    </tr>
+    <tr>
+      <td><b>void clear();</b></td>
+      <td> Removes all values from the current session object. <br clear="all">
+
+      <em>&nbsp;&nbsp;&nbsp;
+session.clear();&nbsp;</em></td>
+      <td>1.0</td>
+    </tr>
+
+  </tbody>
+</table>
+
+<h3><a name="SessionHostObject-3.0References"></a>3.0
+References</h3>
+
+<ul>
+
+  <li><a 
href="http://www.wso2.org/wiki/display/mashup/Javascript+Web+Service+Annotations";
 title="Javascript Web Service Annotations">Javascript Web
+Service Annotations</a> </li>
+
+  <li><a 
href="apidocs/org/wso2/mashup/hostobjects/session/SessionHostObject.html">JavaDoc
+for the session host Object</a></li>
+
+</ul>
+
+</div>
+
+<p>� WSO2 Inc.</p>
+
 </body>
-</html>
\ No newline at end of file
+</html>

_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev

Reply via email to