|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.util.CamelContextHelper
public final class CamelContextHelper
A number of helper methods
Method Summary | ||
---|---|---|
static
|
convertTo(CamelContext context,
Class<T> type,
Object value)
Converts the given value to the requested type |
|
static Endpoint |
getEndpointInjection(CamelContext camelContext,
String uri,
String name,
String injectionPointName,
boolean mandatory)
Evaluates the @EndpointInject annotation using the given context |
|
|
getEndpoints(CamelContext camelContext,
Class<T> type)
Returns a list of all endpoints of the given type |
|
static Endpoint |
getMandatoryEndpoint(CamelContext camelContext,
String uri)
Returns the mandatory endpoint for the given URI or the NoSuchEndpointException is thrown |
|
static
|
getMandatoryEndpoint(CamelContext camelContext,
String uri,
Class<T> type)
Returns the mandatory endpoint for the given URI and type or the NoSuchEndpointException is thrown |
|
static
|
getSingletonEndpoints(CamelContext camelContext,
Class<T> type)
Returns a list of all singleton endpoints of the given type |
|
static Object |
lookup(CamelContext context,
String name)
Look up the given named bean in the Registry on the
CamelContext |
|
static
|
lookup(CamelContext context,
String name,
Class<T> beanType)
Look up the given named bean of the given type in the Registry on the
CamelContext |
|
static
|
mandatoryConvertTo(CamelContext context,
Class<T> type,
Object value)
Converts the given value to the specified type throwing an IllegalArgumentException
if the value could not be converted to a non null value |
|
static Object |
mandatoryLookup(CamelContext context,
String name)
Look up the given named bean in the Registry on the
CamelContext or throws |
|
static
|
mandatoryLookup(CamelContext context,
String name,
Class<T> beanType)
Look up the given named bean of the given type in the Registry on the
CamelContext |
|
static
|
newInstance(CamelContext context,
Class<T> beanType)
Creates a new instance of the given type using the Injector on the given
CamelContext |
|
static Expression |
resolveMandatoryExpression(CamelContext camelContext,
String languageName,
String expressionText)
Resolves the mandatory language name and expression text into a Expression instance
throwing an exception if it could not be created |
|
static Language |
resolveMandatoryLanguage(CamelContext camelContext,
String languageName)
Resolves the given language name into a Language or throws an exception if it could not be converted |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Endpoint getMandatoryEndpoint(CamelContext camelContext, String uri) throws NoSuchEndpointException
NoSuchEndpointException
is thrown
NoSuchEndpointException
public static <T extends Endpoint> T getMandatoryEndpoint(CamelContext camelContext, String uri, Class<T> type)
NoSuchEndpointException
is thrown
public <T> List<T> getEndpoints(CamelContext camelContext, Class<T> type)
camelContext
- the camel contexttype
- the type of the endpoints requested
public static <T> List<T> getSingletonEndpoints(CamelContext camelContext, Class<T> type)
camelContext
- the camel contexttype
- the type of the endpoints requested
public static <T> T convertTo(CamelContext context, Class<T> type, Object value)
public static <T> T mandatoryConvertTo(CamelContext context, Class<T> type, Object value)
IllegalArgumentException
if the value could not be converted to a non null value
public static <T> T newInstance(CamelContext context, Class<T> beanType)
Injector
on the given
CamelContext
public static Object lookup(CamelContext context, String name)
Registry
on the
CamelContext
public static <T> T lookup(CamelContext context, String name, Class<T> beanType)
Registry
on the
CamelContext
public static Object mandatoryLookup(CamelContext context, String name)
Registry
on the
CamelContext
or throws
public static <T> T mandatoryLookup(CamelContext context, String name, Class<T> beanType)
Registry
on the
CamelContext
public static Language resolveMandatoryLanguage(CamelContext camelContext, String languageName)
Language
or throws an exception if it could not be converted
public static Expression resolveMandatoryExpression(CamelContext camelContext, String languageName, String expressionText)
Expression
instance
throwing an exception if it could not be created
public static Endpoint getEndpointInjection(CamelContext camelContext, String uri, String name, String injectionPointName, boolean mandatory)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |