Coverage Report - org.mule.transport.servlet.jetty.ContinuationsReplyTo
 
Classes in this File Line Coverage Branch Coverage Complexity
ContinuationsReplyTo
0%
0/9
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.servlet.jetty;
 8  
 
 9  
 import org.mortbay.util.ajax.Continuation;
 10  
 
 11  
 /**
 12  
  * This class wraps a continuation object and provides a way to synchronize the access to it by a mutex lock object.
 13  
  */
 14  
 public class ContinuationsReplyTo
 15  
 {
 16  
     private Continuation continuation;
 17  
     private Object mutex;
 18  
 
 19  
     public ContinuationsReplyTo(Continuation continuation, Object mutex)
 20  0
     {
 21  0
         this.continuation = continuation;
 22  0
         this.mutex = mutex;
 23  0
     }
 24  
     
 25  
     public void setAndResume(Object value)
 26  
     {
 27  0
         synchronized(mutex)
 28  
         {
 29  0
             continuation.setObject(value);
 30  0
             continuation.resume();
 31  0
         }
 32  0
     }
 33  
 }
 34  
 
 35