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