Class ProxyServiceAdmin

java.lang.Object
org.wso2.carbon.core.AbstractAdmin
org.wso2.carbon.mediation.initializer.AbstractServiceBusAdmin
org.wso2.carbon.proxyadmin.service.ProxyServiceAdmin

public class ProxyServiceAdmin extends org.wso2.carbon.mediation.initializer.AbstractServiceBusAdmin
The class ProxyServiceAdmin provides the administration service to configure proxy services.
  • Field Details

  • Constructor Details

    • ProxyServiceAdmin

      public ProxyServiceAdmin()
  • Method Details

    • enableStatistics

      public String enableStatistics(String proxyName) throws ProxyAdminException
      Enables statistics for the specified proxy service
      Parameters:
      proxyName - name of the proxy service name of which the statistics need to be enabled
      Returns:
      successful on success or failed otherwise
      Throws:
      ProxyAdminException - in case of a failure in enabling statistics
    • disableStatistics

      public String disableStatistics(String proxyName) throws ProxyAdminException
      Disables statistics for the specified proxy service
      Parameters:
      proxyName - name of the proxy service of which statistics need to be disabled
      Returns:
      successful on success or failed if unsuccessful
      Throws:
      ProxyAdminException - in case of a failure in disabling statistics
    • enableTracing

      public String enableTracing(String proxyName) throws ProxyAdminException
      Enables tracing for the specified proxy service
      Parameters:
      proxyName - name of the the proxy service of which tracing needs to be enabled
      Returns:
      successful on success or failed otherwise
      Throws:
      ProxyAdminException - in case of a failure in enabling tracing
    • disableTracing

      public String disableTracing(String proxyName) throws ProxyAdminException
      Disables tracing for the specified proxy service
      Parameters:
      proxyName - name of the proxy service of which tracing needs to be disabled
      Returns:
      SUCCESSFUL is the operation is successful and FAILED if it is failed
      Throws:
      ProxyAdminException - in case of a failure in disabling tracing
    • deleteProxyService

      public String deleteProxyService(String proxyName) throws ProxyAdminException
      Deletes a proxy service from the synapse configuration
      Parameters:
      proxyName - name of the proxy service which needs to be deleted
      Returns:
      successful on success or failed otherwise
      Throws:
      ProxyAdminException - if the proxy service name given is not existent in the synapse configuration
    • getAvailableTransports

      public String[] getAvailableTransports() throws ProxyAdminException
      Get the available transport names from the AxisConfiguration
      Returns:
      String array of available transport names
      Throws:
      ProxyAdminException
    • getAvailableSequences

      public String[] getAvailableSequences() throws ProxyAdminException
      Get the available sequences from the SynapseConfiguration
      Returns:
      String array of available sequence names
      Throws:
      ProxyAdminException - if there is an error
    • getAvailableEndpoints

      public String[] getAvailableEndpoints() throws ProxyAdminException
      Get the available endpoints from the SynapseConfiguration
      Returns:
      String array of available endpoint names
      Throws:
      ProxyAdminException - if there is an error
    • getEndpoint

      public String getEndpoint(String name) throws ProxyAdminException
      Gets the endpoint object defined under the given name
      Parameters:
      name - the name of the endpoint
      Returns:
      endpoint configuration related with the name
      Throws:
      ProxyAdminException - if the endpoint is not found for the given name
    • getMetaData

      public MetaData getMetaData() throws ProxyAdminException
      Encapsulates the available transports, endpoints, and sequences into a single two dimensional array
      Returns:
      A two dimensional array containing the set of transports, endpoints, and sequences under 0,1, and 2 indices.
      Throws:
      ProxyAdminException
    • startProxyService

      public String startProxyService(String proxyName) throws ProxyAdminException
      Starts the service specified by the name
      Parameters:
      proxyName - name of the proxy service which needs to be started
      Returns:
      successful on success or failed otherwise
      Throws:
      ProxyAdminException - in case of a failure in starting the service
    • stopProxyService

      public String stopProxyService(String proxyName) throws ProxyAdminException
      Stops the service specified by the name
      Parameters:
      proxyName - name of the proxy service which needs to be stoped
      Returns:
      successful on success or failed otherwise
      Throws:
      ProxyAdminException - in case of a failure in stopping the service
    • redeployProxyService

      public String redeployProxyService(String proxyName) throws ProxyAdminException
      Redeploying service Removes an existing one,Adds a new one
      Parameters:
      proxyName - name of the proxy service which needs to be redeployed
      Returns:
      successful on success or failed otherwise
      Throws:
      ProxyAdminException - in case of a failure in redeploying the service
    • getSourceView

      public String getSourceView(ProxyData pd) throws ProxyAdminException
      Throws:
      ProxyAdminException
    • getProxy

      public ProxyData getProxy(String proxyName) throws ProxyAdminException
      Throws:
      ProxyAdminException
    • addProxy

      public String addProxy(ProxyData pd) throws ProxyAdminException
      Throws:
      ProxyAdminException
    • modifyProxy

      public String modifyProxy(ProxyData pd) throws ProxyAdminException
      Throws:
      ProxyAdminException
    • persistProxyService

      public void persistProxyService(org.apache.synapse.core.axis2.ProxyService proxy) throws ProxyAdminException
      Throws:
      ProxyAdminException