Class EndpointAdminClient


  • public class EndpointAdminClient
    extends Object
    • Constructor Detail

      • EndpointAdminClient

        public EndpointAdminClient​(String cookie,
                                   String backendServerURL,
                                   org.apache.axis2.context.ConfigurationContext configCtx)
                            throws org.apache.axis2.AxisFault
        Throws:
        org.apache.axis2.AxisFault
    • Method Detail

      • addEndpoint

        public void addEndpoint​(String endpointString)
                         throws Exception
        Add an Endpoint described by the given configuration
        Parameters:
        endpointString - - configuration representing the endpoint that needs to be added
        Throws:
        Exception - in case of an error
      • switchOn

        public void switchOn​(String name)
                      throws Exception
        Set Endpoint status to Active
        Parameters:
        name - name of the endpoint
        Throws:
        Exception - in case of an error
      • switchOff

        public void switchOff​(String name)
                       throws Exception
        Switch off Endpoint given by the name
        Parameters:
        name - name of the endpoint
        Throws:
        Exception - in case of an error
      • deleteEndpoint

        public void deleteEndpoint​(String epName)
                            throws Exception
        Delete an endpoint from the synapse configuration
        Parameters:
        epName - endpoint name
        Throws:
        Exception - in case of an error
      • deleteSelectedEndpoints

        public void deleteSelectedEndpoints​(String[] epNames)
                                     throws Exception
        Delete selected endpoints from synapse configuration
        Parameters:
        epNames -
        Throws:
        Exception
      • deleteAllEndpointGroups

        public void deleteAllEndpointGroups()
                                     throws Exception
        Delete all endpoints in the synapse configuration
        Throws:
        Exception
      • deleteDynamicEndpoint

        public void deleteDynamicEndpoint​(String key)
                                   throws Exception
        Delete an endpoint from the registry
        Parameters:
        key - key of the dynamic endpoint
        Throws:
        Exception - in case of an error
      • getDependents

        public org.wso2.carbon.endpoint.stub.types.common.ConfigurationObject[] getDependents​(String epName)
                                                                                       throws Exception
        Get dependents of a particular endpoint.
        Parameters:
        epName - endpoint name
        Returns:
        dependants of a endpoints
        Throws:
        Exception
      • updateDynamicEndpoint

        public void updateDynamicEndpoint​(String key,
                                          String epConfiguration)
                                   throws Exception
        Update an existing dynamic endpoint
        Parameters:
        key - dynamic endpoint key
        epConfiguration - new endpoint configuration
        Throws:
        Exception - in case of an error
      • getEndpoint

        public String getEndpoint​(String epName)
                           throws Exception
        Gets the endpoint element as a string
        Parameters:
        epName - - name of the endpoint
        Returns:
        String representing the endpoint with the given endpoint name
        Throws:
        Exception - in case of an error
      • getEndpoints

        public String[] getEndpoints()
                              throws Exception
        Get all endpoint configurations from the synapse configuration
        Returns:
        a list of all the endpoints
        Throws:
        Exception - in case of an error
      • getDynamicEndpoint

        public String getDynamicEndpoint​(String key)
                                  throws Exception
        Get a dynamic endpoint from the registry
        Parameters:
        key - dynamic endpoint key
        Returns:
        dynamic endpoint configuration
        Throws:
        Exception - on an error
      • getDynamicEndpoints

        public String[] getDynamicEndpoints​(int pageNumber,
                                            int endpointsPerPage)
                                     throws Exception
        Get all endpoints stored in the registry
        Parameters:
        pageNumber - page number
        endpointsPerPage - no of endpoints per page
        Returns:
        endpoints in the registry
        Throws:
        Exception - in case of an error
      • getDynamicEndpointsSearch

        public String[] getDynamicEndpointsSearch​(int pageNumber,
                                                  int endpointsPerPage,
                                                  String searchText)
                                           throws Exception
        Get Metadata of all the Searched Dynamic Endpoints in the Synapse configuration
        Parameters:
        pageNumber -
        endpointsPerPage -
        searchText -
        Returns:
        Throws:
        Exception
      • getEndpointService

        public EndpointService getEndpointService​(org.wso2.carbon.endpoint.stub.types.service.EndpointMetaData metaData)
                                           throws XMLStreamException
        Get the endpoint service for the given endpoint metadata
        Parameters:
        metaData - Metadata of an endpoint
        Returns:
        endpoint service for the given endpoint metadata
        Throws:
        XMLStreamException - in case of an error
      • getEndpointService

        public EndpointService getEndpointService​(String endpointString)
                                           throws XMLStreamException
        Get the endpoint service for the given endpoint configuration
        Parameters:
        endpointString - configuration of the endpoint
        Returns:
        endpoint service for the given endpoint configuration
        Throws:
        XMLStreamException - in case of an error
      • getEndpointMetaData

        public org.wso2.carbon.endpoint.stub.types.service.EndpointMetaData[] getEndpointMetaData​(int pageNumber,
                                                                                                  int endpointsPerPage)
                                                                                           throws Exception
        Get Metadata of all the Endpoints in the Synapse configuration
        Parameters:
        pageNumber - page number
        endpointsPerPage - no of endpoints per page
        Returns:
        EndpointMetaData
        Throws:
        Exception - in case of an error
      • getEndpointMetaDataSearch

        public org.wso2.carbon.endpoint.stub.types.service.EndpointMetaData[] getEndpointMetaDataSearch​(int pageNumber,
                                                                                                        int endpointsPerPage,
                                                                                                        String searchText)
                                                                                                 throws Exception
        Get Metadata of all the Searched Endpoints in the Synapse configuration
        Parameters:
        pageNumber -
        endpointsPerPage -
        searchText -
        Returns:
        Throws:
        Exception
      • enableStatistics

        public void enableStatistics​(String name)
                              throws Exception
        Enable statistics collection for the specified endpoint
        Parameters:
        name - name of the endpoint
        Throws:
        Exception - in case of an error
      • disableStatistics

        public void disableStatistics​(String name)
                               throws Exception
        Stop collecting statistics for a specified endpoint
        Parameters:
        name - name of the endpoint
        Throws:
        Exception - in case of an error
      • addDynamicEndpoint

        public void addDynamicEndpoint​(String key,
                                       String epName)
                                throws Exception
        Add an endpoint to the Synapse registry
        Parameters:
        key - of the dynamic endpoint
        epName - endpoint name
        Throws:
        Exception - in case of an error
      • saveDynamicEndpoint

        public void saveDynamicEndpoint​(String key,
                                        String epName)
                                 throws Exception
        Save an endpoint to the Synapse registry
        Parameters:
        key - dynamic endpoint key
        epName - endpoint name
        Throws:
        Exception - in case of an error
      • saveEndpoint

        public void saveEndpoint​(String epName)
                          throws Exception
        Save an endpoint
        Parameters:
        epName - endpoint name
        Throws:
        Exception - in case of an error
      • getEndpointCount

        public int getEndpointCount()
                             throws Exception
        Get the endpoint count
        Returns:
        number of endpoints
        Throws:
        Exception
      • getDynamicEndpointCount

        public int getDynamicEndpointCount()
                                    throws Exception
        Get the dynamic endpoint count
        Returns:
        number of dynamic endpoints
        Throws:
        Exception
      • isRegisterNull

        public boolean isRegisterNull()
                               throws Exception
        check the registry
        Returns:
        true if register is null
        Throws:
        Exception