org.apache.camel.util
Class EndpointHelper

java.lang.Object
  extended by org.apache.camel.util.EndpointHelper

public final class EndpointHelper
extends Object

Some helper methods for working with Endpoint instances

Version:
$Revision: 771248 $

Method Summary
static boolean matchEndpoint(String uri, String pattern)
          Matches the endpoint with the given pattern.
static void pollEndpoint(Endpoint endpoint, Processor processor)
          Creates a PollingConsumer and polls all pending messages on the endpoint and invokes the given Processor to process each Exchange and then closes down the consumer and throws any exceptions thrown.
static void pollEndpoint(Endpoint endpoint, Processor processor, long timeout)
          Creates a PollingConsumer and polls all pending messages on the endpoint and invokes the given Processor to process each Exchange and then closes down the consumer and throws any exceptions thrown.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

pollEndpoint

public static void pollEndpoint(Endpoint endpoint,
                                Processor processor,
                                long timeout)
                         throws Exception
Creates a PollingConsumer and polls all pending messages on the endpoint and invokes the given Processor to process each Exchange and then closes down the consumer and throws any exceptions thrown.

Throws:
Exception

pollEndpoint

public static void pollEndpoint(Endpoint endpoint,
                                Processor processor)
                         throws Exception
Creates a PollingConsumer and polls all pending messages on the endpoint and invokes the given Processor to process each Exchange and then closes down the consumer and throws any exceptions thrown.

Throws:
Exception

matchEndpoint

public static boolean matchEndpoint(String uri,
                                    String pattern)
Matches the endpoint with the given pattern.

The match rules are applied in this order:

Parameters:
uri - the endpoint uri
pattern - a pattern to match
Returns:
true if match, false otherwise.


Copyright © 2009 Apache Software Foundation. All Rights Reserved.