public interface RouteManager
The routing manager is responsible for forwarding messages between containers. One implementation of this interface is based on Apache Camel, others might follow.
| Modifier and Type | Method and Description |
|---|---|
void |
addRoute(@NonNull java.lang.String routeDefinition)
Adds a route and starts it.
|
void |
delRoute(@NonNull java.lang.String routeId)
Removes a route from one endpoint to another.
|
@NonNull java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> |
getEndpoints()
List all route endpoints, i.e. all URLs to which routes exist.
|
@Nullable RouteObject |
getRoute(@NonNull java.lang.String id)
Returns a list of currently installed routes.
|
@NonNull java.lang.String |
getRouteAsProlog(@NonNull java.lang.String routeId)
Returns the given route configuration in a Prolog representation.
|
java.lang.String |
getRouteAsString(@NonNull java.lang.String routeId)
Returns the given route in its original representation of the implementing engine.
|
@NonNull java.util.List<java.lang.String> |
getRouteInputUris(@NonNull java.lang.String routeId)
Returns a List of URIs of the given route's inputs (from definitions)
|
@NonNull java.util.Map<java.lang.String,RouteMetrics> |
getRouteMetrics()
Returns aggregated runtime metrics of all installed routes.
|
@NonNull java.util.List<RouteObject> |
getRoutes()
Returns a list of currently installed routes.
|
@NonNull java.util.List<RouteComponent> |
listComponents()
List all supported components, i.e. supported endpoint protocols.
|
@NonNull java.util.Map<java.lang.String,java.lang.String> |
listEndpoints() |
@NonNull RouteObject |
saveRoute(@NonNull java.lang.String routeId,
@NonNull java.lang.String routeRepresentation)
Save a route, replacing it with a new representation within the same context
|
void |
startRoute(@NonNull java.lang.String routeId)
Starts a route.
|
void |
stopRoute(@NonNull java.lang.String routeId)
Sends a request to stop a route.
|
@NonNull java.util.List<RouteObject> getRoutes()
@Nullable RouteObject getRoute(@NonNull java.lang.String id)
void startRoute(@NonNull java.lang.String routeId)
throws RouteException
routeId - RouteExceptionvoid stopRoute(@NonNull java.lang.String routeId)
throws RouteException
routeId - java.lang.ExceptionRouteException@NonNull java.util.List<RouteComponent> listComponents()
@NonNull java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> getEndpoints()
@NonNull java.util.Map<java.lang.String,java.lang.String> listEndpoints()
@NonNull RouteObject saveRoute(@NonNull java.lang.String routeId, @NonNull java.lang.String routeRepresentation) throws RouteException
routeId - ID of the route to saverouteRepresentation - The new textual representation of the route (XML etc.)RouteException - If the route does not exist or some Exception was thrown during route
replacement.void addRoute(@NonNull java.lang.String routeDefinition)
throws RouteException
Endpoint declarations must be supported by the underlying implementation.
If the route id already exists, this method will throw a RouteException and not overwrite the existing route.
routeDefinition - Textual representation of the route (XML etc.)RouteException - if a route with the same id already exists or if any Exception is thrown
during loading and starting the route.void delRoute(@NonNull java.lang.String routeId)
The deletion becomes immediately effective.
Endpoint declarations must be supported by the underlying implementation.
routeId - java.lang.String getRouteAsString(@NonNull java.lang.String routeId)
Note that this method may return null if the implementing engine does not support a textual route configuration.
For Apache Camel, this method will return the XML-based Camel DSL configuration file.
@NonNull java.util.List<java.lang.String> getRouteInputUris(@NonNull java.lang.String routeId)
routeId - The identifier of the route@NonNull java.util.Map<java.lang.String,RouteMetrics> getRouteMetrics()
@NonNull java.lang.String getRouteAsProlog(@NonNull java.lang.String routeId)
routeId - ID of route to retrieve prolog representation for