org.apache.camel.model
Class FromDefinition

java.lang.Object
  extended by org.apache.camel.model.OptionalIdentifiedDefinition<FromDefinition>
      extended by org.apache.camel.model.FromDefinition
All Implemented Interfaces:
NamedNode

public class FromDefinition
extends OptionalIdentifiedDefinition<FromDefinition>

Represents an XML <from/> element

Version:

Constructor Summary
FromDefinition()
           
FromDefinition(Endpoint endpoint)
           
FromDefinition(String uri)
           
 
Method Summary
protected  void clear()
           
protected static String description(String uri, String ref, Endpoint endpoint)
           
 Endpoint getEndpoint()
          Gets tne endpoint if an Endpoint instance was set.
 String getLabel()
           
 String getRef()
           
 String getShortName()
          Returns a short name for this node which can be useful for ID generation or referring to related resources like images
 String getUri()
           
 Object getUriOrRef()
          Returns the endpoint URI or the name of the reference to it
 Endpoint resolveEndpoint(RouteContext context)
           
 void setEndpoint(Endpoint endpoint)
           
 void setRef(String ref)
          Sets the name of the endpoint within the registry (such as the Spring ApplicationContext or JNDI) to use
 void setUri(String uri)
          Sets the URI of the endpoint to use
 String toString()
           
 
Methods inherited from class org.apache.camel.model.OptionalIdentifiedDefinition
description, getDescription, getDescriptionText, getId, hasCustomIdAssigned, id, idOrCreate, setDescription, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FromDefinition

public FromDefinition()

FromDefinition

public FromDefinition(String uri)

FromDefinition

public FromDefinition(Endpoint endpoint)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getShortName

public String getShortName()
Description copied from class: OptionalIdentifiedDefinition
Returns a short name for this node which can be useful for ID generation or referring to related resources like images

Specified by:
getShortName in interface NamedNode
Overrides:
getShortName in class OptionalIdentifiedDefinition<FromDefinition>
Returns:
defaults to "node" but derived nodes should overload this to provide a unique name

getLabel

public String getLabel()

resolveEndpoint

public Endpoint resolveEndpoint(RouteContext context)

getUri

public String getUri()

setUri

@Required
public void setUri(String uri)
Sets the URI of the endpoint to use

Parameters:
uri - the endpoint URI to use

getRef

public String getRef()

setRef

public void setRef(String ref)
Sets the name of the endpoint within the registry (such as the Spring ApplicationContext or JNDI) to use

Parameters:
ref - the reference name to use

getEndpoint

public Endpoint getEndpoint()
Gets tne endpoint if an Endpoint instance was set.

This implementation may return null which means you need to use getRef() or getUri() to get information about the endpoint.

Returns:
the endpoint instance, or null

setEndpoint

public void setEndpoint(Endpoint endpoint)

getUriOrRef

public Object getUriOrRef()
Returns the endpoint URI or the name of the reference to it


description

protected static String description(String uri,
                                    String ref,
                                    Endpoint endpoint)

clear

protected void clear()


Apache CAMEL