Coverage Report - org.mule.module.client.remoting.notification.RemoteDispatcherNotification
 
Classes in this File Line Coverage Branch Coverage Complexity
RemoteDispatcherNotification
0%
0/17
N/A
1
 
 1  
 /*
 2  
  * $Id: RemoteDispatcherNotification.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.module.client.remoting.notification;
 12  
 
 13  
 import org.mule.api.MuleMessage;
 14  
 import org.mule.api.context.notification.ServerNotification;
 15  
 
 16  
 import java.util.HashMap;
 17  
 import java.util.Map;
 18  
 
 19  
 /**
 20  
  * <code>RemoteDispatcherNotification</code> is used to invoke actions on a remote mule server
 21  
  */
 22  
 
 23  
 public class RemoteDispatcherNotification extends ServerNotification
 24  
 {
 25  
     /**
 26  
      * Serial version
 27  
      */
 28  
     private static final long serialVersionUID = -53091546441476249L;
 29  
 
 30  
     /** This is a low range since it was allocated before being refactred into the client module from core */
 31  
     public static final int REMOTE_DISPATCHER_EVENT_ACTION_START_RANGE = 600;
 32  
 
 33  
     public static final int ACTION_RECEIVE = REMOTE_DISPATCHER_EVENT_ACTION_START_RANGE + 1;
 34  
     public static final int ACTION_DISPATCH = REMOTE_DISPATCHER_EVENT_ACTION_START_RANGE + 2;
 35  
     public static final int ACTION_SEND = REMOTE_DISPATCHER_EVENT_ACTION_START_RANGE + 3;
 36  
     public static final int ACTION_INVOKE = REMOTE_DISPATCHER_EVENT_ACTION_START_RANGE + 4;
 37  
     public static final int ACTION_WIRE_FORMAT = REMOTE_DISPATCHER_EVENT_ACTION_START_RANGE + 5;
 38  
 
 39  
     static {
 40  0
         registerAction("receive event", ACTION_RECEIVE);
 41  0
         registerAction("dispatch event", ACTION_DISPATCH);
 42  0
         registerAction("send event", ACTION_SEND);
 43  0
         registerAction("invoke component", ACTION_INVOKE);
 44  0
         registerAction("request wire format", ACTION_WIRE_FORMAT);
 45  0
     }
 46  
 
 47  0
     private Map properties = new HashMap();
 48  
     private MuleMessage message;
 49  
 
 50  
     public RemoteDispatcherNotification(MuleMessage message, int action)
 51  
     {
 52  0
         super(cloneMessage(message), action);
 53  0
     }
 54  
 
 55  
     public RemoteDispatcherNotification(MuleMessage message, int action, String resourceIdentifier)
 56  
     {
 57  0
         super(cloneMessage(message), action, resourceIdentifier);
 58  0
         this.message = message;
 59  0
     }
 60  
 
 61  
     public MuleMessage getMessage()
 62  
     {
 63  0
         return message;
 64  
     }
 65  
 
 66  
     public void setProperty(Object key, Object value)
 67  
     {
 68  0
         properties.put(key, value);
 69  0
     }
 70  
 
 71  
     public Object getProperty(Object key)
 72  
     {
 73  0
         return properties.get(key);
 74  
     }
 75  
 
 76  
     public Map getProperties()
 77  
     {
 78  0
         return properties;
 79  
     }
 80  
 }