KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mule > providers > soap > xfire > XFireMuleSession


1 /*
2  * $Id: XFireMuleSession.java 3937 2006-11-20 16:04:25Z lajos $
3  * --------------------------------------------------------------------------------------
4  * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
5  *
6  * The software in this package is published under the terms of the MuleSource MPL
7  * license, a copy of which has been included with this distribution in the
8  * LICENSE.txt file.
9  */

10
11 package org.mule.providers.soap.xfire;
12
13 import org.codehaus.xfire.transport.Session;
14 import org.mule.umo.UMOSession;
15
16 /**
17  * Mules session wrapper for XFire
18  */

19 public class XFireMuleSession implements Session
20 {
21     UMOSession session;
22
23     public XFireMuleSession(UMOSession session)
24     {
25         if (session == null)
26         {
27             throw new NullPointerException JavaDoc("UMOSession");
28         }
29         this.session = session;
30     }
31
32     /**
33      * Get a variable from the session by the key.
34      *
35      * @param key
36      * @return Value
37      */

38     public Object JavaDoc get(Object JavaDoc key)
39     {
40         return session.getProperty(key);
41     }
42
43     /**
44      * Put a variable into the session with a key.
45      *
46      * @param key
47      * @param value
48      */

49     public void put(Object JavaDoc key, Object JavaDoc value)
50     {
51         session.setProperty(key, value);
52     }
53 }
54
Popular Tags