Class CGAgentAdminService


  • public class CGAgentAdminService
    extends org.wso2.carbon.core.AbstractAdmin
    The class CGAgentAdminService provides the admin service to manipulate the CGAgent remotely
    • Constructor Detail

      • CGAgentAdminService

        public CGAgentAdminService()
    • Method Detail

      • publishService

        public void publishService​(String serviceName,
                                   String serverName,
                                   boolean isAutomatic)
                            throws org.wso2.carbon.cloud.gateway.common.CGException
        Deploy the proxy service
        Parameters:
        serviceName - the service to deploy
        serverName - the serverName to publish
        isAutomatic - the mode of service publishing
        Throws:
        org.wso2.carbon.cloud.gateway.common.CGException - throws in case of an error
      • rePublishService

        public void rePublishService​(String serviceName,
                                     String serverName,
                                     boolean isAutomatic)
                              throws org.wso2.carbon.cloud.gateway.common.CGException
        Throws:
        org.wso2.carbon.cloud.gateway.common.CGException
      • unPublishService

        public void unPublishService​(String serviceName,
                                     String serverName,
                                     boolean isCheckBackend)
                              throws org.wso2.carbon.cloud.gateway.common.CGException
        Un-deploy the proxy service
        Parameters:
        serviceName - the service to un-deploy
        serverName - the server name to publish
        isCheckBackend - check the backend availability
        Throws:
        org.wso2.carbon.cloud.gateway.common.CGException - throws in case of an error
      • addCGServer

        public void addCGServer​(org.wso2.carbon.cloud.gateway.common.CGServerBean csgServer)
                         throws org.wso2.carbon.cloud.gateway.common.CGException
        Add a new CG server and store it in registry
        Parameters:
        csgServer - new csg server instance
        Throws:
        org.wso2.carbon.cloud.gateway.common.CGException - throws in case of an error
      • getCGServer

        public org.wso2.carbon.cloud.gateway.common.CGServerBean getCGServer​(String csgServerName)
                                                                      throws org.wso2.carbon.cloud.gateway.common.CGException
        Get the CG server given by the name
        Parameters:
        csgServerName - csg server name
        Returns:
        the csg server instance
        Throws:
        org.wso2.carbon.cloud.gateway.common.CGException - throws in case of an error
      • getCGServerList

        public org.wso2.carbon.cloud.gateway.common.CGServerBean[] getCGServerList()
                                                                            throws org.wso2.carbon.cloud.gateway.common.CGException
        Get the set of CSG servers
        Returns:
        the list of CG_TRANSPORT_NAME servers
        Throws:
        org.wso2.carbon.cloud.gateway.common.CGException - throws in case of an error
      • updateCGServer

        public void updateCGServer​(org.wso2.carbon.cloud.gateway.common.CGServerBean csgServer)
                            throws org.wso2.carbon.cloud.gateway.common.CGException
        Update the CSG server and persist new information into registry
        Parameters:
        csgServer - new csg server information
        Throws:
        org.wso2.carbon.cloud.gateway.common.CGException - throws in case of an error
      • removeCGServer

        public void removeCGServer​(String csgServerName)
                            throws org.wso2.carbon.cloud.gateway.common.CGException
        Remove the CSG server given by the name
        Parameters:
        csgServerName - the csg server name
        Throws:
        org.wso2.carbon.cloud.gateway.common.CGException - throws in case of an error
      • getServiceStatus

        public String getServiceStatus​(String serviceName)
                                throws org.wso2.carbon.cloud.gateway.common.CGException
        Returns the status of the service
        Parameters:
        serviceName - service name
        Returns:
        a string states representing the service status
        Throws:
        org.wso2.carbon.cloud.gateway.common.CGException - throws in case of an error
      • setServiceStatus

        public void setServiceStatus​(String serviceName,
                                     String status)
                              throws org.wso2.carbon.cloud.gateway.common.CGException
        Throws:
        org.wso2.carbon.cloud.gateway.common.CGException
      • doServiceUpdate

        public void doServiceUpdate​(String serviceName,
                                    int eventType)
                             throws org.wso2.carbon.cloud.gateway.common.CGException
        Throws:
        org.wso2.carbon.cloud.gateway.common.CGException
      • getPublishedServer

        public String getPublishedServer​(String serviceName)
                                  throws org.wso2.carbon.cloud.gateway.common.CGException
        Get the server that this service has published to
        Parameters:
        serviceName - service name
        Returns:
        the server that this service has published to
        Throws:
        org.wso2.carbon.cloud.gateway.common.CGException - throws in case of an error
      • getPublishedProxyToolsURLs

        public org.wso2.carbon.cloud.gateway.stub.types.common.CGProxyToolsURLs getPublishedProxyToolsURLs​(String serviceName)
                                                                                                    throws org.wso2.carbon.cloud.gateway.common.CGException
        Throws:
        org.wso2.carbon.cloud.gateway.common.CGException
      • isHasPublishedServices

        public boolean isHasPublishedServices​(String csgServerName)
                                       throws org.wso2.carbon.cloud.gateway.common.CGException
        Determines whether at least a one service has been published to specified CSG server.
        Parameters:
        csgServerName - Name of the CSG sever
        Returns:
        true if there is at least a one service published to the CSG server or false otherwise.
        Throws:
        org.wso2.carbon.cloud.gateway.common.CGException - in case of an error
      • removeExposedTransports

        protected void removeExposedTransports​(String serviceName,
                                               String transportProtocol)
                                        throws Exception
        Throws:
        Exception
      • isUTEnabled

        protected boolean isUTEnabled​(String serviceName)
                               throws org.apache.axis2.AxisFault
        Throws:
        org.apache.axis2.AxisFault
      • listTransports

        protected org.wso2.carbon.core.transports.util.TransportSummary[] listTransports()