Class CGAgentAdminClient


  • public class CGAgentAdminClient
    extends Object
    This class CGAgentAdminClient provides the admin client for CSGAgent.
    • Constructor Detail

      • CGAgentAdminClient

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

      • publish

        public void publish​(String serviceName,
                            String serverName,
                            boolean isAutoMatic)
                     throws org.apache.axis2.AxisFault
        Publish the service
        Parameters:
        serviceName - name of the service to publish
        serverName - name of the server from which to unpublished
        isAutoMatic - the mode of publishing
        Throws:
        org.apache.axis2.AxisFault - in case of an error
      • unPublish

        public void unPublish​(String serviceName,
                              String serverName)
                       throws org.apache.axis2.AxisFault
        Un publish the service
        Parameters:
        serviceName - name of the service to unpublished
        serverName - name of the server from which to unpublished
        Throws:
        org.apache.axis2.AxisFault - in case of an error
      • addCGServer

        public void addCGServer​(org.wso2.carbon.cloud.gateway.agent.stub.types.carbon.CGServerBean csgServer)
                         throws org.apache.axis2.AxisFault
        Add a CSG server bean
        Parameters:
        csgServer - the csg server bean with server information
        Throws:
        org.apache.axis2.AxisFault - throws in case of an error
      • getCGServerList

        public org.wso2.carbon.cloud.gateway.agent.stub.types.carbon.CGServerBean[] getCGServerList()
                                                                                             throws org.apache.axis2.AxisFault
        Get the available list of csg servers
        Returns:
        the csg server list
        Throws:
        org.apache.axis2.AxisFault - throws in case of an error
      • removeCGServer

        public void removeCGServer​(String serverName)
                            throws org.apache.axis2.AxisFault
        Remove this csg server instance
        Parameters:
        serverName - the unique csg server name to delete
        Throws:
        org.apache.axis2.AxisFault - throws in case of an error
      • getCGServer

        public org.wso2.carbon.cloud.gateway.agent.stub.types.carbon.CGServerBean getCGServer​(String serverName)
                                                                                       throws org.apache.axis2.AxisFault
        Get the CSG server bean given the server name
        Parameters:
        serverName - the csg server name
        Returns:
        the csg server instance given by this name
        Throws:
        org.apache.axis2.AxisFault - throws in case of an error
      • updateCGServer

        public void updateCGServer​(org.wso2.carbon.cloud.gateway.agent.stub.types.carbon.CGServerBean bean)
                            throws org.apache.axis2.AxisFault
        Update an already existing csg server
        Parameters:
        bean - the new csg server information
        Throws:
        org.apache.axis2.AxisFault - throws in case of an error
      • getServiceStatus

        public String getServiceStatus​(String serviceName)
                                throws org.apache.axis2.AxisFault
        Is the given service already published
        Parameters:
        serviceName - service
        Returns:
        status of the csg service
        Throws:
        org.apache.axis2.AxisFault - throws in case of an error
      • setServiceStatus

        public void setServiceStatus​(String serviceName,
                                     String status)
                              throws org.apache.axis2.AxisFault
        Throws:
        org.apache.axis2.AxisFault
      • getPublishedServer

        public String getPublishedServer​(String serviceName)
                                  throws org.apache.axis2.AxisFault
        Get the server that this service has published
        Parameters:
        serviceName - the service
        Returns:
        the list of servers
        Throws:
        org.apache.axis2.AxisFault - throws in case of an error
      • getPublishedProxyToolsURLs

        public org.wso2.carbon.cloud.gateway.agent.stub.types.carbon.CGProxyToolsURLs getPublishedProxyToolsURLs​(String serviceName)
                                                                                                          throws org.apache.axis2.AxisFault
        Throws:
        org.apache.axis2.AxisFault
      • isHasPublishedServices

        public boolean isHasPublishedServices​(String serverName)
                                       throws org.apache.axis2.AxisFault
        Determines whether at least one service has been published to specified CSG server.
        Parameters:
        serverName - Name of the CSG sever
        Returns:
        if there is at least a one service published to the CSG server or false otherwise.
        Throws:
        org.apache.axis2.AxisFault - in case of an error