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  
  * 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;
 8  
 
 9  0
 public enum MessageExchangePattern
 10  
 {    
 11  0
     ONE_WAY
 12  
     {
 13  
         @Override
 14  
         public boolean hasResponse()
 15  
         {
 16  0
             return false;
 17  
         }
 18  
     }, 
 19  
     
 20  0
     REQUEST_RESPONSE
 21  
     {
 22  
         @Override
 23  
         public boolean hasResponse()
 24  
         {
 25  0
             return true;
 26  
         }
 27  
     }; 
 28  
     
 29  
     public abstract boolean hasResponse();
 30  
 
 31  
     public static MessageExchangePattern fromSyncFlag(boolean sync)
 32  
     {
 33  0
         if (sync)
 34  
         {
 35  0
             return REQUEST_RESPONSE;
 36  
         }
 37  
         else
 38  
         {
 39  0
             return ONE_WAY;
 40  
         }
 41  
     }
 42  
 
 43  
     public static MessageExchangePattern fromString(String string)
 44  
     {
 45  0
         String mepString = string.toUpperCase().replace('-', '_');
 46  0
         return MessageExchangePattern.valueOf(mepString);
 47  
     }
 48  
 }