org.wso2.carbon.cloud.gateway.agent.ui

## Class CGAgentAdminClient

- java.lang.Object
- - org.wso2.carbon.cloud.gateway.agent.ui.CGAgentAdminClient

-     public class CGAgentAdminClient
      extends Object

  This class `CGAgentAdminClient` provides the admin client for CSGAgent.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CGAgentAdminClient(String cookie, String backendServerURL, org.apache.axis2.context.ConfigurationContext configCtx, Locale locale)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCGServer(org.wso2.carbon.cloud.gateway.agent.stub.types.carbon.CGServerBean csgServer)` Add a CSG server bean
    `org.wso2.carbon.cloud.gateway.agent.stub.types.carbon.CGServerBean` | `getCGServer(String serverName)` Get the CSG server bean given the server name
    `org.wso2.carbon.cloud.gateway.agent.stub.types.carbon.CGServerBean[]` | `getCGServerList()` Get the available list of csg servers
    `org.wso2.carbon.cloud.gateway.agent.stub.types.carbon.CGProxyToolsURLs` | `getPublishedProxyToolsURLs(String serviceName)`
    `String` | `getPublishedServer(String serviceName)` Get the server that this service has published
    `String` | `getServiceStatus(String serviceName)` Is the given service already published
    `boolean` | `isHasPublishedServices(String serverName)` Determines whether at least one service has been published to specified CSG server.
    `void` | `publish(String serviceName, String serverName, boolean isAutoMatic)` Publish the service
    `void` | `removeCGServer(String serverName)` Remove this csg server instance
    `void` | `setServiceStatus(String serviceName, String status)`
    `void` | `unPublish(String serviceName, String serverName)` Un publish the service
    `void` | `updateCGServer(org.wso2.carbon.cloud.gateway.agent.stub.types.carbon.CGServerBean bean)` Update an already existing csg server

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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

Copyright © 2021 WSO2. All rights reserved.