|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.util.EndpointHelper
public final class EndpointHelper
Some helper methods for working with Endpoint
instances
Method Summary | |
---|---|
static boolean |
isReferenceParameter(String parameter)
Is the given parameter a reference parameter (starting with a # char) |
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. |
static void |
setProperties(CamelContext context,
Object bean,
Map parameters)
Sets the regular properties on the given bean |
static void |
setReferenceProperties(CamelContext context,
Object bean,
Map parameters)
Sets the reference properties on the given bean This is convention over configuration, setting all reference parameters (using isReferenceParameter(String)
by looking it up in registry and setting it on the bean if possible. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void pollEndpoint(Endpoint endpoint, Processor processor, long timeout) throws Exception
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.
Exception
public static void pollEndpoint(Endpoint endpoint, Processor processor) throws Exception
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.
Exception
public static boolean matchEndpoint(String uri, String pattern)
uri
- the endpoint uripattern
- a pattern to match
public static void setProperties(CamelContext context, Object bean, Map parameters) throws Exception
context
- the camel contextbean
- the beanparameters
- parameters
Exception
- is thrown if setting property failspublic static void setReferenceProperties(CamelContext context, Object bean, Map parameters) throws Exception
isReferenceParameter(String)
by looking it up in registry and setting it on the bean if possible.
context
- the camel contextbean
- the beanparameters
- parameters
Exception
- is thrown if setting property failspublic static boolean isReferenceParameter(String parameter)
parameter
- the parameter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |