org.apache.servicemix.nmr.api.service
Class ServiceHelper

java.lang.Object
  extended by org.apache.servicemix.nmr.api.service.ServiceHelper

public final class ServiceHelper
extends java.lang.Object


Method Summary
static java.util.Map<java.lang.String,java.lang.Object> createMap(java.lang.String... data)
           
static Wire createWire(java.util.Map<java.lang.String,?> from, java.util.Map<java.lang.String,java.lang.Object> to)
          Creates a Wire instance
static boolean equals(java.util.Map<java.lang.String,?> first, java.util.Map<java.lang.String,?> second)
          Check if two endpoint propery maps are equal.
static boolean matches(java.util.Map<java.lang.String,?> first, java.util.Map<java.lang.String,?> second)
          Check if two endpoint propery maps match.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createMap

public static java.util.Map<java.lang.String,java.lang.Object> createMap(java.lang.String... data)

equals

public static boolean equals(java.util.Map<java.lang.String,?> first,
                             java.util.Map<java.lang.String,?> second)
Check if two endpoint propery maps are equal. This will check both maps for equal sizes, keys and values. If either map is null, it will return false.

Parameters:
first - the first endpoint property map
second - the second endpoint property map
Returns:
true if the endpoint maps are equal, false if it

matches

public static boolean matches(java.util.Map<java.lang.String,?> first,
                              java.util.Map<java.lang.String,?> second)
Check if two endpoint propery maps match. If will return true if, for every key in the first map, there's a matching key and value in the second map. If either map is null, it will return false. Compared to the equals(Map, Map) method, this will allow for the second Map to contain more information than the first Map and still be considered a match

Parameters:
first - the first endpoint property map
second - the second endpoint property map
Returns:
true if the endpoint maps are equal, false if it

createWire

public static Wire createWire(java.util.Map<java.lang.String,?> from,
                              java.util.Map<java.lang.String,java.lang.Object> to)
Creates a Wire instance

Parameters:
to - the target for the wire
Returns:
the wire object


Copyright © 2005-2009 The Apache Software Foundation. All Rights Reserved.