|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.utah.further.core.camel.CamelUtil
@Utility public final class CamelUtil
Apache Camel EIP utilities.
-----------------------------------------------------------------------------------
(c) 2008-2010 FURTHeR Project, Health Sciences IT, University of Utah
Contact: Dr. Scott Narus <scott.narus@hsc.utah.edu>
Biomedical Informatics, 26 South 2000 East
Room 5775 HSEB, Salt Lake City, UT 84112
Day Phone: 1-801-213-3288
-----------------------------------------------------------------------------------
<oren.livne@utah.edu>
Method Summary | ||
---|---|---|
static void |
copyBodyAndHeaders(org.apache.camel.Exchange exchange)
Copy an in-out exchange's IN body and headers into its OUT. |
|
static void |
copyBodyAndHeaders(org.apache.camel.Exchange sourceExchange,
org.apache.camel.Exchange targetExchange)
Copy a source exchange's IN body and headers into a target exchange's OUT. |
|
static void |
copyHeaders(org.apache.camel.Exchange sourceExchange,
org.apache.camel.Exchange targetExchange)
Copy a source exchange's IN headers into a target exchange's OUT. |
|
static List<String> |
getExchangeInBodies(List<? extends org.apache.camel.Exchange> exchanges)
Return the list of bodies of the IN parts of a list of exchanges. |
|
static String |
getGroupedExchangeBodiesAsString(org.apache.camel.component.mock.MockEndpoint endpoint)
|
|
static List<org.apache.camel.Exchange> |
getGroupedExchangeList(org.apache.camel.Exchange entity)
|
|
static List<org.apache.camel.Exchange> |
getGroupedExchangeList(org.apache.camel.component.mock.MockEndpoint endpoint,
int index)
|
|
static Object |
getHeader(Map<String,Object> headers,
Named headerName)
Return a header using a Named object to determine the header's name. |
|
static Object |
getHeader(org.apache.camel.Message message,
Named headerName)
Return an message header using a Named object to determine the header's
name. |
|
static org.apache.camel.Exchange |
getLatestResult(org.apache.camel.component.mock.MockEndpoint endpoint)
|
|
static
|
getMessageBody(org.apache.camel.Exchange exchange,
Class<T> returnType,
T fallBackValue)
Return a Camel IN message's body as a typed entity. |
|
static void |
setHeader(Map<String,Object> headers,
Named headerName,
Object headerValue)
Set a header using a Named object to determine the header's name. |
|
static void |
setHeader(Map<String,Object> headers,
String headerName,
Object headerValue)
Set a header using a Named object to determine the header's name. |
|
static void |
setHeader(org.apache.camel.Message message,
Named headerName,
Object headerValue)
Set a message header using a Named object to determine the header's name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static org.apache.camel.Exchange getLatestResult(org.apache.camel.component.mock.MockEndpoint endpoint)
endpoint
-
public static List<org.apache.camel.Exchange> getGroupedExchangeList(org.apache.camel.component.mock.MockEndpoint endpoint, int index)
endpoint
- index
-
public static List<org.apache.camel.Exchange> getGroupedExchangeList(org.apache.camel.Exchange entity)
entity
-
public static String getGroupedExchangeBodiesAsString(org.apache.camel.component.mock.MockEndpoint endpoint)
endpoint
-
public static List<String> getExchangeInBodies(List<? extends org.apache.camel.Exchange> exchanges)
exchanges
- input message
public static void copyBodyAndHeaders(org.apache.camel.Exchange exchange)
exchange
- an in-out exchangepublic static void copyBodyAndHeaders(org.apache.camel.Exchange sourceExchange, org.apache.camel.Exchange targetExchange)
sourceExchange
- source exchange to copy fromtargetExchange
- target exchange to copy intopublic static void copyHeaders(org.apache.camel.Exchange sourceExchange, org.apache.camel.Exchange targetExchange)
sourceExchange
- source exchange to copy fromtargetExchange
- target exchange to copy intopublic static Object getHeader(Map<String,Object> headers, Named headerName)
Named
object to determine the header's name.
headers
- headers map to updateheaderName
- header name is this object's getName()
method's return
value
https://jira.chpc.utah.edu/browse/FUR-507
public static Object getHeader(org.apache.camel.Message message, Named headerName)
Named
object to determine the header's
name.
message
- camel exchange messageheaderName
- header name is this object's getName()
method's return
value
https://jira.chpc.utah.edu/browse/FUR-507
public static void setHeader(Map<String,Object> headers, String headerName, Object headerValue)
Named
object to determine the header's name.
headers
- headers map to updateheaderName
- header name is this object's getName()
method's return
valueheaderValue
- method valuehttps://jira.chpc.utah.edu/browse/FUR-507
public static void setHeader(Map<String,Object> headers, Named headerName, Object headerValue)
Named
object to determine the header's name.
headers
- headers map to updateheaderName
- header name is this object's getName()
method's return
valueheaderValue
- method valuehttps://jira.chpc.utah.edu/browse/FUR-507
public static void setHeader(org.apache.camel.Message message, Named headerName, Object headerValue)
Named
object to determine the header's name.
message
- message to updateheaderName
- header name is this object's getName()
method's return
valueheaderValue
- method valuehttps://jira.chpc.utah.edu/browse/FUR-507
public static <T> T getMessageBody(org.apache.camel.Exchange exchange, Class<T> returnType, T fallBackValue)
T
.
T
- returned entity type parameterexchange
- camel exchangereturnType
- returned entity classfallBackValue
- fall back value to return if exchange's IN body is null
or
cannot be converted to a T
T
, or fallBackValue
if
the latter is null
or cannot be converted to a T
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |