@DeferredContextBinding public class CamelPlugin extends JPlugin implements org.apache.camel.CamelContextAware, org.apache.camel.ExtendedStartupListener
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME |
static String |
PRODUCER_TEMPLATE |
| Constructor and Description |
|---|
CamelPlugin() |
CamelPlugin(org.apache.camel.CamelContext camelContext) |
CamelPlugin(String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttachment(org.apache.camel.Exchange exchange,
String attachmentFile) |
void |
addConsumer(CamelConsumer consumer) |
void |
emit(Object body)
Emits (sends) the body to all current consumers.
|
org.apache.camel.CamelContext |
getCamelContext() |
List<CamelConsumer> |
getConsumers() |
org.apache.camel.CamelContext |
getContext() |
org.apache.camel.ProducerTemplate |
getProducerTemplate()
Returns the producer template for working with Camel and sending Camel messages to an endpoint.
|
String |
getRouteId(org.apache.camel.Exchange exchange) |
boolean |
isWaitForContextFullyStarted() |
SpongeCamelEvent |
makeInputEvent(String name,
org.apache.camel.Exchange exchange) |
void |
onCamelContextFullyStarted(org.apache.camel.CamelContext context,
boolean alreadyStarted) |
void |
onCamelContextStarted(org.apache.camel.CamelContext context,
boolean alreadyStarted) |
void |
onShutdown() |
org.apache.camel.Processor |
processor(CamelProcessorProvider provider) |
boolean |
removeConsumer(CamelConsumer consumer) |
Object |
requestBody(String uri,
Object body)
Sends the body to an endpoint returning any result output body.
|
void |
sendBody(String uri,
Object body)
Sends the body to an endpoint.
|
void |
setCamelContext(org.apache.camel.CamelContext camelContext) |
void |
setContext(org.apache.camel.CamelContext camelContext) |
void |
setWaitForContextFullyStarted(boolean waitForContextFullyStarted) |
void |
waitForContextFullyStarted()
Waits for Camel context fully started.
|
doShutdown, doStartup, getConfiguration, getEngineOperations, getKnowledgeBase, getLogger, getSponge, onAfterReload, onBeforeReload, onConfigure, onInit, onStartup, setConfiguration, setKnowledgeBase, shutdown, startup, toStringgetDescription, getEngine, getInternalService, getLabel, getName, getState, isFailed, isNew, isNewOrStartingOrRunning, isRunning, isStarting, isStopping, isTerminated, setDescription, setEngine, setLabel, setNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisFailed, isNew, isRunning, isStarting, isStopping, isTerminatedpublic static final String NAME
public static final String PRODUCER_TEMPLATE
public CamelPlugin(org.apache.camel.CamelContext camelContext)
public CamelPlugin()
public CamelPlugin(String name)
public org.apache.camel.CamelContext getContext()
public void waitForContextFullyStarted()
public void setContext(org.apache.camel.CamelContext camelContext)
public List<CamelConsumer> getConsumers()
public void addConsumer(CamelConsumer consumer)
public boolean removeConsumer(CamelConsumer consumer)
public SpongeCamelEvent makeInputEvent(String name, org.apache.camel.Exchange exchange)
public void emit(Object body)
body - the body.public void sendBody(String uri, Object body)
getProducerTemplate().sendBody(uri, body).uri - the URI.body - the body.public Object requestBody(String uri, Object body)
getProducerTemplate().requestBody(uri, body).uri - the URI.body - the body.public org.apache.camel.ProducerTemplate getProducerTemplate()
public void addAttachment(org.apache.camel.Exchange exchange,
String attachmentFile)
public String getRouteId(org.apache.camel.Exchange exchange)
public void setCamelContext(org.apache.camel.CamelContext camelContext)
setCamelContext in interface org.apache.camel.CamelContextAwarepublic org.apache.camel.CamelContext getCamelContext()
getCamelContext in interface org.apache.camel.CamelContextAwarepublic boolean isWaitForContextFullyStarted()
public void setWaitForContextFullyStarted(boolean waitForContextFullyStarted)
public void onShutdown()
onShutdown in interface org.openksavi.sponge.plugin.PluginonShutdown in class BasePluginpublic void onCamelContextStarted(org.apache.camel.CamelContext context,
boolean alreadyStarted)
throws Exception
onCamelContextStarted in interface org.apache.camel.StartupListenerExceptionpublic void onCamelContextFullyStarted(org.apache.camel.CamelContext context,
boolean alreadyStarted)
throws Exception
onCamelContextFullyStarted in interface org.apache.camel.StartupListenerExceptionpublic org.apache.camel.Processor processor(CamelProcessorProvider provider)
Copyright © 2016–2021 Softelnet. All rights reserved.