Class EndpointFactory

    • Field Detail

      • ON_FAULT_Q

        public static final QName ON_FAULT_Q
    • Constructor Detail

      • EndpointFactory

        protected EndpointFactory()
    • Method Detail

      • getEndpointFromElement

        public static Endpoint getEndpointFromElement​(org.apache.axiom.om.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.
        Parameters:
        elem - XML from which the endpoint will be built
        isAnonymous - whether this is an anonymous endpoint or not
        properties - bag of properties to pass in any information to the factory
        Returns:
        created endpoint
      • getEndpointFromElement

        public static Endpoint getEndpointFromElement​(org.apache.axiom.om.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.
        Parameters:
        elem - XML from which the endpoint will be built
        factory - custom definition factory which this endpoint will be used to build
        isAnonymous - whether this is an anonymous endpoint or not
        properties - bag of properties to pass in any information to the factory
        Returns:
        created endpoint
      • getObjectFromOMNode

        public Object getObjectFromOMNode​(org.apache.axiom.om.OMNode om,
                                          Properties properties)
        Creates the Endpoint object from the provided OMNode
        Specified by:
        getObjectFromOMNode in interface XMLToObjectMapper
        Parameters:
        om - XML node from which the endpoint will be built
        properties - bag of properties to pass in any information to the factory
        Returns:
        created endpoint as an Object
      • createEndpoint

        protected abstract Endpoint createEndpoint​(org.apache.axiom.om.OMElement epConfig,
                                                   boolean anonymousEndpoint,
                                                   Properties properties)
        Creates the Endpoint implementation for the given XML endpoint configuration. If the endpoint configuration is an inline one, it should be an anonymous endpoint. If it is defined as an immediate child element of the definitions tag it should have a name, which is used as the key in local registry.
        Parameters:
        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
        Returns:
        Endpoint implementation for the given configuration.
      • extractSpecificEndpointProperties

        protected void extractSpecificEndpointProperties​(EndpointDefinition definition,
                                                         org.apache.axiom.om.OMElement elem)
      • getEndpoints

        protected ArrayList<Endpoint> getEndpoints​(org.apache.axiom.om.OMElement listEndpointElement,
                                                   Endpoint parent,
                                                   Properties properties)
        Helper method to construct children endpoints
        Parameters:
        listEndpointElement - OMElement representing the children endpoints
        parent - Parent endpoint
        properties - bag of properties to pass in any information to the factory
        Returns:
        List of children endpoints
      • setEndpointDefinitionFactory

        public void setEndpointDefinitionFactory​(DefinitionFactory factory)
        provide a custom Endpoint definition factory
        Parameters:
        factory -
      • getEndpointDefinitionFactory

        public DefinitionFactory getEndpointDefinitionFactory()
        return current factory for building this endpoint definition
        Returns:
      • processProperties

        protected void processProperties​(PropertyInclude endpoint,
                                         org.apache.axiom.om.OMElement endpointElement)
        Helper method to extract endpoint properties.
        Parameters:
        endpoint - actual endpoint to set the properties
        endpointElement - actual endpoint element
      • handleException

        protected static void handleException​(String msg)
      • handleException

        protected static void handleException​(String msg,
                                              Exception e)