Coverage Report - org.mule.transport.soap.axis.extensions.AxisMuleSession
 
Classes in this File Line Coverage Branch Coverage Complexity
AxisMuleSession
0%
0/26
N/A
1
 
 1  
 /*
 2  
  * $Id: AxisMuleSession.java 20321 2010-11-24 15:21:24Z dfeist $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 package org.mule.transport.soap.axis.extensions;
 11  
 
 12  
 import org.mule.api.MuleSession;
 13  
 
 14  
 import java.util.Enumeration;
 15  
 
 16  
 import org.apache.commons.collections.iterators.IteratorEnumeration;
 17  
 
 18  
 /**
 19  
  * Provides an adapter to a DefaultMuleSession so that Axis can write to the session
 20  
  */
 21  
 public class AxisMuleSession implements org.apache.axis.session.Session
 22  
 {
 23  
 
 24  
     private MuleSession session;
 25  0
     private Object lock = new Object();
 26  
 
 27  
     public AxisMuleSession(MuleSession session)
 28  0
     {
 29  0
         this.session = session;
 30  0
     }
 31  
 
 32  
     public Object get(String string)
 33  
     {
 34  0
         synchronized(lock)
 35  
         {
 36  0
             return session.getProperty(string);
 37  0
         }
 38  
     }
 39  
 
 40  
     public void set(String string, Object object)
 41  
     {
 42  0
         synchronized(lock)
 43  
         {
 44  0
             session.setProperty(string, object);
 45  0
         }
 46  0
     }
 47  
 
 48  
     public void remove(String string)
 49  
     {
 50  0
         synchronized(lock)
 51  
         {
 52  0
             session.removeProperty(string);
 53  0
         }
 54  0
     }
 55  
 
 56  
     public Enumeration getKeys()
 57  
     {
 58  0
         synchronized(lock)
 59  
         {
 60  0
             return new IteratorEnumeration(session.getPropertyNames());
 61  0
         }
 62  
     }
 63  
 
 64  
     public void setTimeout(int i)
 65  
     {
 66  
          // TODO not supported
 67  0
     }
 68  
 
 69  
     public int getTimeout()
 70  
     {
 71  0
         return 0;
 72  
     }
 73  
 
 74  
     public void touch()
 75  
     {
 76  
         // nothing here to touch
 77  0
     }
 78  
 
 79  
     public void invalidate()
 80  
     {
 81  0
         synchronized(lock)
 82  
         {
 83  0
             session.setValid(false);
 84  0
         }
 85  0
     }
 86  
 
 87  
     public Object getLockObject()
 88  
     {
 89  0
         return lock;
 90  
     }
 91  
 }