Coverage Report - org.mule.model.seda.SedaModel
 
Classes in this File Line Coverage Branch Coverage Complexity
SedaModel
0%
0/19
0%
0/6
1.375
 
 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.model.seda;
 8  
 
 9  
 import org.mule.api.lifecycle.InitialisationException;
 10  
 import org.mule.config.PoolingProfile;
 11  
 import org.mule.config.QueueProfile;
 12  
 import org.mule.model.AbstractModel;
 13  
 
 14  
 /**
 15  
  * A mule service service model that uses SEDA principals to achieve high
 16  
  * throughput by Queuing events for components and processing them concurrently.
 17  
  */
 18  0
 public class SedaModel extends AbstractModel
 19  
 {
 20  
     /**
 21  
      * The time out used for taking from the Seda Queue.
 22  
      */
 23  
     private Integer queueTimeout;
 24  
 
 25  
     /**
 26  
      * the pooling configuration used when initialising the service described by
 27  
      * this descriptor.
 28  
      */
 29  
     protected PoolingProfile poolingProfile;
 30  
 
 31  
     /**
 32  
      * The queuing profile for events received for this service
 33  
      */
 34  
     protected QueueProfile queueProfile;
 35  
 
 36  
     /**
 37  
      * Returns the model type name. This is a friendly identifier that is used to
 38  
      * look up the SPI class for the model
 39  
      * 
 40  
      * @return the model type
 41  
      */
 42  
     public String getType()
 43  
     {
 44  0
         return "seda";
 45  
     }
 46  
 
 47  
     public void initialise() throws InitialisationException
 48  
     {
 49  0
         if (queueTimeout == null)
 50  
         {
 51  0
             queueTimeout = muleContext.getConfiguration().getDefaultQueueTimeout();
 52  
         }
 53  0
         if (queueProfile == null)
 54  
         {
 55  0
             queueProfile = new QueueProfile();
 56  
         }
 57  0
         if (poolingProfile == null)
 58  
         {
 59  0
             poolingProfile = new PoolingProfile();
 60  
         }
 61  0
         super.initialise();
 62  0
     }
 63  
 
 64  
     public int getQueueTimeout()
 65  
     {
 66  0
         return queueTimeout;
 67  
     }
 68  
 
 69  
     public void setQueueTimeout(int queueTimeout)
 70  
     {
 71  0
         this.queueTimeout = queueTimeout;
 72  0
     }
 73  
 
 74  
     public PoolingProfile getPoolingProfile()
 75  
     {
 76  0
         return poolingProfile;
 77  
     }
 78  
 
 79  
     public void setPoolingProfile(PoolingProfile poolingProfile)
 80  
     {
 81  0
         this.poolingProfile = poolingProfile;
 82  0
     }
 83  
 
 84  
     public QueueProfile getQueueProfile()
 85  
     {
 86  0
         return queueProfile;
 87  
     }
 88  
 
 89  
     public void setQueueProfile(QueueProfile queueProfile)
 90  
     {
 91  0
         this.queueProfile = queueProfile;
 92  0
     }
 93  
 }