Class CGAgentAdminService
- java.lang.Object
-
- org.wso2.carbon.core.AbstractAdmin
-
- org.wso2.carbon.cloud.gateway.agent.service.CGAgentAdminService
-
public class CGAgentAdminService extends org.wso2.carbon.core.AbstractAdminThe classCGAgentAdminServiceprovides the admin service to manipulate the CGAgent remotely
-
-
Constructor Summary
Constructors Constructor Description CGAgentAdminService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCGServer(org.wso2.carbon.cloud.gateway.common.CGServerBean csgServer)Add a new CG server and store it in registryprotected voidaddExposedTransports(String serviceName, String transport)voiddoServiceUpdate(String serviceName, int eventType)org.wso2.carbon.cloud.gateway.common.CGServerBeangetCGServer(String csgServerName)Get the CG server given by the nameorg.wso2.carbon.cloud.gateway.common.CGServerBean[]getCGServerList()Get the set of CSG serversorg.wso2.carbon.cloud.gateway.stub.types.common.CGProxyToolsURLsgetPublishedProxyToolsURLs(String serviceName)StringgetPublishedServer(String serviceName)Get the server that this service has published toStringgetServiceStatus(String serviceName)Returns the status of the servicebooleanisHasPublishedServices(String csgServerName)Determines whether at least a one service has been published to specified CSG server.protected booleanisUTEnabled(String serviceName)protected org.wso2.carbon.core.transports.util.TransportSummary[]listTransports()voidpublishService(String serviceName, String serverName, boolean isAutomatic)Deploy the proxy servicevoidremoveCGServer(String csgServerName)Remove the CSG server given by the nameprotected voidremoveExposedTransports(String serviceName, String transportProtocol)voidrePublishService(String serviceName, String serverName, boolean isAutomatic)voidsetServiceStatus(String serviceName, String status)voidunPublishService(String serviceName, String serverName, boolean isCheckBackend)Un-deploy the proxy servicevoidupdateCGServer(org.wso2.carbon.cloud.gateway.common.CGServerBean csgServer)Update the CSG server and persist new information into registry-
Methods inherited from class org.wso2.carbon.core.AbstractAdmin
getAxisConfig, getConfigContext, getConfigSystemRegistry, getConfigUserRegistry, getGovernanceRegistry, getGovernanceSystemRegistry, getGovernanceUserRegistry, getHttpSession, getLocalRepo, getRegistry, getTenantDomain, getUsername, getUserRealm, setConfigurationContext, setPermissionUpdateTimestamp
-
-
-
-
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 deployserverName- the serverName to publishisAutomatic- 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-deployserverName- the server name to publishisCheckBackend- 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.CGExceptionAdd 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.CGExceptionGet 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.CGExceptionUpdate 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
-
addExposedTransports
protected void addExposedTransports(String serviceName, String transport) throws Exception
- Throws:
Exception
-
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()
-
-