Coverage Report - org.mule.MessageExchangePattern
 
Classes in this File Line Coverage Branch Coverage Complexity
MessageExchangePattern
0%
0/8
0%
0/2
0
MessageExchangePattern$1
0%
0/2
N/A
0
MessageExchangePattern$2
0%
0/2
N/A
0
 
 1  
 /*
 2  
  * $Id: MessageExchangePattern.java 19191 2010-08-25 21:05:23Z tcarlson $
 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  
 
 11  
 package org.mule;
 12  
 
 13  0
 public enum MessageExchangePattern
 14  
 {    
 15  0
     ONE_WAY
 16  
     {
 17  
         @Override
 18  
         public boolean hasResponse()
 19  
         {
 20  0
             return false;
 21  
         }
 22  
     }, 
 23  
     
 24  0
     REQUEST_RESPONSE
 25  
     {
 26  
         @Override
 27  
         public boolean hasResponse()
 28  
         {
 29  0
             return true;
 30  
         }
 31  
     }; 
 32  
     
 33  
     public abstract boolean hasResponse();
 34  
 
 35  
     public static MessageExchangePattern fromSyncFlag(boolean sync)
 36  
     {
 37  0
         if (sync)
 38  
         {
 39  0
             return REQUEST_RESPONSE;
 40  
         }
 41  
         else
 42  
         {
 43  0
             return ONE_WAY;
 44  
         }
 45  
     }
 46  
 
 47  
     public static MessageExchangePattern fromString(String string)
 48  
     {
 49  0
         String mepString = string.toUpperCase().replace('-', '_');
 50  0
         return MessageExchangePattern.valueOf(mepString);
 51  
     }
 52  
 }