org.apache.camel.component.restlet
Class RestletEndpoint

java.lang.Object
  extended by org.apache.camel.impl.DefaultEndpoint
      extended by org.apache.camel.component.restlet.RestletEndpoint
All Implemented Interfaces:
CamelContextAware, Endpoint, IsSingleton, Service, HasId, HeaderFilterStrategyAware

public class RestletEndpoint
extends DefaultEndpoint
implements HeaderFilterStrategyAware, Service

Represents a endpoint

Version:
$Revision: 21619 $

Constructor Summary
RestletEndpoint(RestletComponent component, String remaining)
           
 
Method Summary
 void connect(RestletConsumer restletConsumer)
           
 Consumer createConsumer(Processor processor)
          Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor
 Producer createProducer()
          Creates a new producer which is used send messages into the endpoint
 void disconnect(RestletConsumer restletConsumer)
           
 ExchangePattern getExchangePattern()
           
 HeaderFilterStrategy getHeaderFilterStrategy()
          Gets the header filter strategy used
 String getHost()
           
 int getPort()
           
 String getProtocol()
           
 RestletBinding getRestletBinding()
           
 org.restlet.data.Method getRestletMethod()
           
 org.restlet.data.Method[] getRestletMethods()
           
 Map<String,String> getRestletRealm()
           
 List<String> getRestletUriPatterns()
           
 String getUriPattern()
           
 boolean isLenientProperties()
          Should all properties be known or does the endpoint allow unknown options?

lenient = false means that the endpoint should validate that all given options is known and configured properly.

 boolean isSingleton()
          Whether this class supports being singleton or not.
 void setHeaderFilterStrategy(HeaderFilterStrategy headerFilterStrategy)
          Sets the header filter strategy to use
 void setHost(String host)
           
 void setPort(int port)
           
 void setProtocol(String protocol)
           
 void setRestletBinding(RestletBinding restletBinding)
           
 void setRestletMethod(org.restlet.data.Method restletMethod)
           
 void setRestletMethods(org.restlet.data.Method[] restletMethods)
           
 void setRestletRealm(Map<String,String> restletRealm)
           
 void setRestletUriPatterns(List<String> restletUriPatterns)
           
 void setUriPattern(String uriPattern)
           
 void start()
          Starts the service
 void stop()
          Stops the service
 
Methods inherited from class org.apache.camel.impl.DefaultEndpoint
configureProperties, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExchangeType, getId, hashCode, isSynchronous, sanitizeUri, setCamelContext, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setSynchronous, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RestletEndpoint

public RestletEndpoint(RestletComponent component,
                       String remaining)
                throws Exception
Throws:
Exception
Method Detail

isSingleton

public boolean isSingleton()
Description copied from interface: IsSingleton
Whether this class supports being singleton or not.

Specified by:
isSingleton in interface IsSingleton
Returns:
true to be a single shared instance, false to create new instances.

isLenientProperties

public boolean isLenientProperties()
Description copied from interface: Endpoint
Should all properties be known or does the endpoint allow unknown options?

lenient = false means that the endpoint should validate that all given options is known and configured properly. lenient = true means that the endpoint allows additional unknown options to be passed to it but does not throw a ResolveEndpointFailedException when creating the endpoint.

This options is used by a few components for instance the HTTP based that can have dynamic URI options appended that is targeted for an external system.

Most endpoints is configured to be not lenient.

Specified by:
isLenientProperties in interface Endpoint
Overrides:
isLenientProperties in class DefaultEndpoint
Returns:
whether properties is lenient or not

createConsumer

public Consumer createConsumer(Processor processor)
                        throws Exception
Description copied from interface: Endpoint
Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor

Specified by:
createConsumer in interface Endpoint
Parameters:
processor - the given processor
Returns:
a newly created consumer
Throws:
Exception - can be thrown

createProducer

public Producer createProducer()
                        throws Exception
Description copied from interface: Endpoint
Creates a new producer which is used send messages into the endpoint

Specified by:
createProducer in interface Endpoint
Returns:
a newly created producer
Throws:
Exception - can be thrown

connect

public void connect(RestletConsumer restletConsumer)
             throws Exception
Throws:
Exception

disconnect

public void disconnect(RestletConsumer restletConsumer)
                throws Exception
Throws:
Exception

getRestletMethod

public org.restlet.data.Method getRestletMethod()

setRestletMethod

public void setRestletMethod(org.restlet.data.Method restletMethod)

getProtocol

public String getProtocol()

setProtocol

public void setProtocol(String protocol)

getHost

public String getHost()

setHost

public void setHost(String host)

getPort

public int getPort()

setPort

public void setPort(int port)

getUriPattern

public String getUriPattern()

setUriPattern

public void setUriPattern(String uriPattern)

getRestletBinding

public RestletBinding getRestletBinding()

setRestletBinding

public void setRestletBinding(RestletBinding restletBinding)

setHeaderFilterStrategy

public void setHeaderFilterStrategy(HeaderFilterStrategy headerFilterStrategy)
Description copied from interface: HeaderFilterStrategyAware
Sets the header filter strategy to use

Specified by:
setHeaderFilterStrategy in interface HeaderFilterStrategyAware
Parameters:
headerFilterStrategy - the strategy

getHeaderFilterStrategy

public HeaderFilterStrategy getHeaderFilterStrategy()
Description copied from interface: HeaderFilterStrategyAware
Gets the header filter strategy used

Specified by:
getHeaderFilterStrategy in interface HeaderFilterStrategyAware
Returns:
the strategy

setRestletRealm

public void setRestletRealm(Map<String,String> restletRealm)

getRestletRealm

public Map<String,String> getRestletRealm()

getExchangePattern

public ExchangePattern getExchangePattern()
Overrides:
getExchangePattern in class DefaultEndpoint

setRestletMethods

public void setRestletMethods(org.restlet.data.Method[] restletMethods)

getRestletMethods

public org.restlet.data.Method[] getRestletMethods()

setRestletUriPatterns

public void setRestletUriPatterns(List<String> restletUriPatterns)

getRestletUriPatterns

public List<String> getRestletUriPatterns()

start

public void start()
           throws Exception
Description copied from interface: Service
Starts the service

Specified by:
start in interface Service
Overrides:
start in class DefaultEndpoint
Throws:
Exception - is thrown if starting failed

stop

public void stop()
          throws Exception
Description copied from interface: Service
Stops the service

Specified by:
stop in interface Service
Overrides:
stop in class DefaultEndpoint
Throws:
Exception - is thrown if stopping failed


Apache CAMEL