Class CGAgentAdminClient
- java.lang.Object
-
- org.wso2.carbon.cloud.gateway.agent.ui.CGAgentAdminClient
-
public class CGAgentAdminClient extends Object
This classCGAgentAdminClientprovides the admin client for CSGAgent.
-
-
Constructor Summary
Constructors Constructor 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 Description voidaddCGServer(org.wso2.carbon.cloud.gateway.agent.stub.types.carbon.CGServerBean csgServer)Add a CSG server beanorg.wso2.carbon.cloud.gateway.agent.stub.types.carbon.CGServerBeangetCGServer(String serverName)Get the CSG server bean given the server nameorg.wso2.carbon.cloud.gateway.agent.stub.types.carbon.CGServerBean[]getCGServerList()Get the available list of csg serversorg.wso2.carbon.cloud.gateway.agent.stub.types.carbon.CGProxyToolsURLsgetPublishedProxyToolsURLs(String serviceName)StringgetPublishedServer(String serviceName)Get the server that this service has publishedStringgetServiceStatus(String serviceName)Is the given service already publishedbooleanisHasPublishedServices(String serverName)Determines whether at least one service has been published to specified CSG server.voidpublish(String serviceName, String serverName, boolean isAutoMatic)Publish the servicevoidremoveCGServer(String serverName)Remove this csg server instancevoidsetServiceStatus(String serviceName, String status)voidunPublish(String serviceName, String serverName)Un publish the servicevoidupdateCGServer(org.wso2.carbon.cloud.gateway.agent.stub.types.carbon.CGServerBean bean)Update an already existing csg server
-
-
-
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 publishserverName- name of the server from which to unpublishedisAutoMatic- 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 unpublishedserverName- 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.AxisFaultAdd 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.AxisFaultGet 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.AxisFaultUpdate 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
-
-