org.apache.camel.impl
Class InterceptSendToMockEndpointStrategy

java.lang.Object
  extended by org.apache.camel.impl.InterceptSendToMockEndpointStrategy
All Implemented Interfaces:
EndpointStrategy

public class InterceptSendToMockEndpointStrategy
extends Object
implements EndpointStrategy

A EndpointStrategy which is capable of mocking endpoints.

This strategy will only apply when new endpoints is being created. If you want to apply existing endpoints, you will have to remove them from the CamelContext beforehand.

Version:

Constructor Summary
InterceptSendToMockEndpointStrategy()
          Mock all endpoints.
InterceptSendToMockEndpointStrategy(String pattern)
          Mock endpoints based on the given pattern.
InterceptSendToMockEndpointStrategy(String pattern, boolean skip)
          Mock endpoints based on the given pattern.
 
Method Summary
 Endpoint registerEndpoint(String uri, Endpoint endpoint)
          Register the endpoint.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InterceptSendToMockEndpointStrategy

public InterceptSendToMockEndpointStrategy()
Mock all endpoints.


InterceptSendToMockEndpointStrategy

public InterceptSendToMockEndpointStrategy(String pattern)
Mock endpoints based on the given pattern.

Parameters:
pattern - the pattern.
See Also:
EndpointHelper.matchEndpoint(org.apache.camel.CamelContext, String, String)

InterceptSendToMockEndpointStrategy

public InterceptSendToMockEndpointStrategy(String pattern,
                                           boolean skip)
Mock endpoints based on the given pattern.

Parameters:
pattern - the pattern.
skip - true to skip sending after the detour to the original endpoint
See Also:
EndpointHelper.matchEndpoint(org.apache.camel.CamelContext, String, String)
Method Detail

registerEndpoint

public Endpoint registerEndpoint(String uri,
                                 Endpoint endpoint)
Description copied from interface: EndpointStrategy
Register the endpoint.

Specified by:
registerEndpoint in interface EndpointStrategy
Parameters:
uri - uri of endpoint
endpoint - the current endpoint to register
Returns:
the real endpoint to register, for instance a wrapped/enhanced endpoint.

toString

public String toString()
Overrides:
toString in class Object


Apache CAMEL