|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.synapse.config.xml.endpoints.EndpointFactory
public abstract class EndpointFactory
All endpoint factories should extend from this abstract class. Use EndpointFactory to obtain the correct endpoint for particular endpoint configuration. As endpoints can be nested inside each other, EndpointFactory implementations may call other EndpointFactory implementations recursively to obtain the required endpoint hierarchy.
This also serves as theXMLToObjectMapper
implementation for specific endpoint
implementations. If the endpoint type is not known use XMLToEndpointMapper
as the
generic XMLToObjectMapper
for all endpoints.
Field Summary | |
---|---|
static QName |
ON_FAULT_Q
|
Constructor Summary | |
---|---|
protected |
EndpointFactory()
|
Method Summary | |
---|---|
protected abstract Endpoint |
createEndpoint(OMElement epConfig,
boolean anonymousEndpoint,
Properties properties)
Creates the Endpoint implementation for the given XML endpoint configuration. |
protected void |
extractSpecificEndpointProperties(EndpointDefinition definition,
OMElement elem)
|
DefinitionFactory |
getEndpointDefinitionFactory()
return current factory for building this endpoint definition |
static Endpoint |
getEndpointFromElement(OMElement elem,
boolean isAnonymous,
Properties properties)
Core method which is exposed for the external use, and this will find the proper EndpointFactory and create the endpoint which is of the format Endpoint . |
static Endpoint |
getEndpointFromElement(OMElement elem,
DefinitionFactory factory,
boolean isAnonymous,
Properties properties)
Core method which is exposed for the external use, and this will find the proper EndpointFactory and create the endpoint which is of the format Endpoint .However
definition for this endpoint will be built using a custom Endpoint Defn factory. |
protected ArrayList<Endpoint> |
getEndpoints(OMElement listEndpointElement,
Endpoint parent,
Properties properties)
Helper method to construct children endpoints |
Object |
getObjectFromOMNode(OMNode om,
Properties properties)
Creates the Endpoint object from the provided OMNode |
protected static void |
handleException(String msg)
|
protected static void |
handleException(String msg,
Exception e)
|
protected void |
processProperties(PropertyInclude endpoint,
OMElement endpointElement)
Helper method to extract endpoint properties. |
void |
setEndpointDefinitionFactory(DefinitionFactory factory)
provide a custom Endpoint definition factory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final QName ON_FAULT_Q
Constructor Detail |
---|
protected EndpointFactory()
Method Detail |
---|
public static Endpoint getEndpointFromElement(OMElement elem, boolean isAnonymous, Properties properties)
EndpointFactory
and create the endpoint which is of the format Endpoint
.
elem
- XML from which the endpoint will be builtisAnonymous
- whether this is an anonymous endpoint or notproperties
- bag of properties to pass in any information to the factory
public static Endpoint getEndpointFromElement(OMElement elem, DefinitionFactory factory, boolean isAnonymous, Properties properties)
EndpointFactory
and create the endpoint which is of the format Endpoint
.However
definition for this endpoint will be built using a custom Endpoint Defn factory.
elem
- XML from which the endpoint will be builtfactory
- custom definition factory which this endpoint will be used to buildisAnonymous
- whether this is an anonymous endpoint or notproperties
- bag of properties to pass in any information to the factory
public Object getObjectFromOMNode(OMNode om, Properties properties)
Endpoint
object from the provided OMNode
getObjectFromOMNode
in interface XMLToObjectMapper
om
- XML node from which the endpoint will be builtproperties
- bag of properties to pass in any information to the factory
Object
protected abstract Endpoint createEndpoint(OMElement epConfig, boolean anonymousEndpoint, Properties properties)
epConfig
- OMElement containing the endpoint configuration.anonymousEndpoint
- false if the endpoint has a name. true otherwise.properties
- bag of properties to pass in any information to the factory
protected void extractSpecificEndpointProperties(EndpointDefinition definition, OMElement elem)
protected ArrayList<Endpoint> getEndpoints(OMElement listEndpointElement, Endpoint parent, Properties properties)
listEndpointElement
- OMElement representing the children endpointsparent
- Parent endpointproperties
- bag of properties to pass in any information to the factory
public void setEndpointDefinitionFactory(DefinitionFactory factory)
factory
- public DefinitionFactory getEndpointDefinitionFactory()
protected void processProperties(PropertyInclude endpoint, OMElement endpointElement)
endpoint
- actual endpoint to set the propertiesendpointElement
- actual endpoint elementprotected static void handleException(String msg)
protected static void handleException(String msg, Exception e)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |