org.apache.camel
Interface RuntimeConfiguration

All Known Subinterfaces:
CamelContext, RouteContext
All Known Implementing Classes:
DefaultCamelContext, DefaultRouteContext, GaeDefaultCamelContext, GaeSpringCamelContext, GuiceCamelContext, OsgiDefaultCamelContext, OsgiSpringCamelContext, SpringCamelContext

public interface RuntimeConfiguration

Various runtime configuration used by CamelContext and RouteContext for cross cutting functions such as tracing, delayer, stream cache and the likes.

Version:
$Revision: 17714 $

Method Summary
 Long getDelayer()
          Gets the delay value
 ShutdownRoute getShutdownRoute()
          Gets the option to use when shutting down route.
 ShutdownRunningTask getShutdownRunningTask()
          Gets the option to use when shutting down a route and how to act when it has running tasks.
 Boolean isAutoStartup()
          Gets whether it should automatic start when Camel starts.
 Boolean isHandleFault()
          Returns whether tracing enabled
 Boolean isStreamCaching()
          Returns whether stream cache is enabled
 Boolean isTracing()
          Returns whether tracing enabled
 void setAutoStartup(Boolean autoStartup)
          Sets whether it should automatic start when Camel starts.
 void setDelayer(Long delay)
          Sets a delay value in millis that a message is delayed at every step it takes in the route path, to slow things down to better helps you to see what goes

Is disabled by default

 void setHandleFault(Boolean handleFault)
          Sets whether handle fault is enabled or not (default is disabled).
 void setShutdownRoute(ShutdownRoute shutdownRoute)
          Sets the option to use when shutting down routes.
 void setShutdownRunningTask(ShutdownRunningTask shutdownRunningTask)
          Sets the option to use when shutting down a route and how to act when it has running tasks.
 void setStreamCaching(Boolean cache)
          Sets whether stream caching is enabled or not (default is disabled).
 void setTracing(Boolean tracing)
          Sets whether tracing is enabled or not (default is disabled).
 

Method Detail

setStreamCaching

void setStreamCaching(Boolean cache)
Sets whether stream caching is enabled or not (default is disabled).

Is disabled by default

Parameters:
cache - whether stream caching is enabled or not

isStreamCaching

Boolean isStreamCaching()
Returns whether stream cache is enabled

Returns:
true if stream cache is enabled

setTracing

void setTracing(Boolean tracing)
Sets whether tracing is enabled or not (default is disabled).

Is disabled by default

Parameters:
tracing - whether tracing is enabled or not.

isTracing

Boolean isTracing()
Returns whether tracing enabled

Returns:
true if tracing is enabled

setHandleFault

void setHandleFault(Boolean handleFault)
Sets whether handle fault is enabled or not (default is disabled).

Is disabled by default

Parameters:
handleFault - whether handle fault is enabled or not.

isHandleFault

Boolean isHandleFault()
Returns whether tracing enabled

Returns:
true if tracing is enabled

setDelayer

void setDelayer(Long delay)
Sets a delay value in millis that a message is delayed at every step it takes in the route path, to slow things down to better helps you to see what goes

Is disabled by default

Parameters:
delay - delay in millis

getDelayer

Long getDelayer()
Gets the delay value

Returns:
delay in millis, or null if disabled

setAutoStartup

void setAutoStartup(Boolean autoStartup)
Sets whether it should automatic start when Camel starts.

Currently only routes can be disabled, as CamelContext itself are always started}
Default is true to always startup.

Parameters:
autoStartup - whether to auto startup.

isAutoStartup

Boolean isAutoStartup()
Gets whether it should automatic start when Camel starts.

Returns:
true if should auto start

setShutdownRoute

void setShutdownRoute(ShutdownRoute shutdownRoute)
Sets the option to use when shutting down routes.

Parameters:
shutdownRoute - the option to use.

getShutdownRoute

ShutdownRoute getShutdownRoute()
Gets the option to use when shutting down route.

Returns:
the option

setShutdownRunningTask

void setShutdownRunningTask(ShutdownRunningTask shutdownRunningTask)
Sets the option to use when shutting down a route and how to act when it has running tasks.

A running task is for example a BatchConsumer which has a group of messages to process. With this option you can control whether it should complete the entire group or stop after the current message has been processed.

Parameters:
shutdownRunningTask - the option to use.

getShutdownRunningTask

ShutdownRunningTask getShutdownRunningTask()
Gets the option to use when shutting down a route and how to act when it has running tasks.

Returns:
the option


Copyright © 2007-2010 IONA Open Source Community. All Rights Reserved.