Class EndpointAdminClient
- java.lang.Object
-
- org.wso2.carbon.endpoint.ui.client.EndpointAdminClient
-
public class EndpointAdminClient extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static intENDPOINT_PER_PAGE
-
Constructor Summary
Constructors Constructor Description EndpointAdminClient(String cookie, String backendServerURL, org.apache.axis2.context.ConfigurationContext configCtx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDynamicEndpoint(String key, String epName)Add an endpoint to the Synapse registryvoidaddEndpoint(String endpointString)Add an Endpoint described by the given configurationvoiddeleteAllEndpointGroups()Delete all endpoints in the synapse configurationvoiddeleteDynamicEndpoint(String key)Delete an endpoint from the registryvoiddeleteEndpoint(String epName)Delete an endpoint from the synapse configurationvoiddeleteSelectedEndpoints(String[] epNames)Delete selected endpoints from synapse configurationvoiddisableStatistics(String name)Stop collecting statistics for a specified endpointvoidenableStatistics(String name)Enable statistics collection for the specified endpointorg.wso2.carbon.endpoint.stub.types.common.ConfigurationObject[]getDependents(String epName)Get dependents of a particular endpoint.StringgetDynamicEndpoint(String key)Get a dynamic endpoint from the registryintgetDynamicEndpointCount()Get the dynamic endpoint countString[]getDynamicEndpoints(int pageNumber, int endpointsPerPage)Get all endpoints stored in the registryString[]getDynamicEndpointsSearch(int pageNumber, int endpointsPerPage, String searchText)Get Metadata of all the Searched Dynamic Endpoints in the Synapse configurationStringgetEndpoint(String epName)Gets the endpoint element as a stringintgetEndpointCount()Get the endpoint countorg.wso2.carbon.endpoint.stub.types.service.EndpointMetaData[]getEndpointMetaData(int pageNumber, int endpointsPerPage)Get Metadata of all the Endpoints in the Synapse configurationorg.wso2.carbon.endpoint.stub.types.service.EndpointMetaData[]getEndpointMetaDataSearch(int pageNumber, int endpointsPerPage, String searchText)Get Metadata of all the Searched Endpoints in the Synapse configurationString[]getEndpoints()Get all endpoint configurations from the synapse configurationEndpointServicegetEndpointService(String endpointString)Get the endpoint service for the given endpoint configurationEndpointServicegetEndpointService(org.wso2.carbon.endpoint.stub.types.service.EndpointMetaData metaData)Get the endpoint service for the given endpoint metadatabooleanisRegisterNull()check the registryvoidsaveDynamicEndpoint(String key, String epName)Save an endpoint to the Synapse registryvoidsaveEndpoint(String epName)Save an endpointvoidswitchOff(String name)Switch off Endpoint given by the namevoidswitchOn(String name)Set Endpoint status to ActivevoidupdateDynamicEndpoint(String key, String epConfiguration)Update an existing dynamic endpoint
-
-
-
Field Detail
-
ENDPOINT_PER_PAGE
public static final int ENDPOINT_PER_PAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
addEndpoint
public void addEndpoint(String endpointString) throws Exception
Add an Endpoint described by the given configuration- Parameters:
endpointString- - configuration representing the endpoint that needs to be added- Throws:
Exception- in case of an error
-
switchOn
public void switchOn(String name) throws Exception
Set Endpoint status to Active- Parameters:
name- name of the endpoint- Throws:
Exception- in case of an error
-
switchOff
public void switchOff(String name) throws Exception
Switch off Endpoint given by the name- Parameters:
name- name of the endpoint- Throws:
Exception- in case of an error
-
deleteEndpoint
public void deleteEndpoint(String epName) throws Exception
Delete an endpoint from the synapse configuration- Parameters:
epName- endpoint name- Throws:
Exception- in case of an error
-
deleteSelectedEndpoints
public void deleteSelectedEndpoints(String[] epNames) throws Exception
Delete selected endpoints from synapse configuration- Parameters:
epNames-- Throws:
Exception
-
deleteAllEndpointGroups
public void deleteAllEndpointGroups() throws ExceptionDelete all endpoints in the synapse configuration- Throws:
Exception
-
deleteDynamicEndpoint
public void deleteDynamicEndpoint(String key) throws Exception
Delete an endpoint from the registry- Parameters:
key- key of the dynamic endpoint- Throws:
Exception- in case of an error
-
getDependents
public org.wso2.carbon.endpoint.stub.types.common.ConfigurationObject[] getDependents(String epName) throws Exception
Get dependents of a particular endpoint.- Parameters:
epName- endpoint name- Returns:
- dependants of a endpoints
- Throws:
Exception
-
updateDynamicEndpoint
public void updateDynamicEndpoint(String key, String epConfiguration) throws Exception
Update an existing dynamic endpoint- Parameters:
key- dynamic endpoint keyepConfiguration- new endpoint configuration- Throws:
Exception- in case of an error
-
getEndpoint
public String getEndpoint(String epName) throws Exception
Gets the endpoint element as a string- Parameters:
epName- - name of the endpoint- Returns:
- String representing the endpoint with the given endpoint name
- Throws:
Exception- in case of an error
-
getEndpoints
public String[] getEndpoints() throws Exception
Get all endpoint configurations from the synapse configuration- Returns:
- a list of all the endpoints
- Throws:
Exception- in case of an error
-
getDynamicEndpoint
public String getDynamicEndpoint(String key) throws Exception
Get a dynamic endpoint from the registry- Parameters:
key- dynamic endpoint key- Returns:
- dynamic endpoint configuration
- Throws:
Exception- on an error
-
getDynamicEndpoints
public String[] getDynamicEndpoints(int pageNumber, int endpointsPerPage) throws Exception
Get all endpoints stored in the registry- Parameters:
pageNumber- page numberendpointsPerPage- no of endpoints per page- Returns:
- endpoints in the registry
- Throws:
Exception- in case of an error
-
getDynamicEndpointsSearch
public String[] getDynamicEndpointsSearch(int pageNumber, int endpointsPerPage, String searchText) throws Exception
Get Metadata of all the Searched Dynamic Endpoints in the Synapse configuration- Parameters:
pageNumber-endpointsPerPage-searchText-- Returns:
- Throws:
Exception
-
getEndpointService
public EndpointService getEndpointService(org.wso2.carbon.endpoint.stub.types.service.EndpointMetaData metaData) throws XMLStreamException
Get the endpoint service for the given endpoint metadata- Parameters:
metaData- Metadata of an endpoint- Returns:
- endpoint service for the given endpoint metadata
- Throws:
XMLStreamException- in case of an error
-
getEndpointService
public EndpointService getEndpointService(String endpointString) throws XMLStreamException
Get the endpoint service for the given endpoint configuration- Parameters:
endpointString- configuration of the endpoint- Returns:
- endpoint service for the given endpoint configuration
- Throws:
XMLStreamException- in case of an error
-
getEndpointMetaData
public org.wso2.carbon.endpoint.stub.types.service.EndpointMetaData[] getEndpointMetaData(int pageNumber, int endpointsPerPage) throws ExceptionGet Metadata of all the Endpoints in the Synapse configuration- Parameters:
pageNumber- page numberendpointsPerPage- no of endpoints per page- Returns:
- EndpointMetaData
- Throws:
Exception- in case of an error
-
getEndpointMetaDataSearch
public org.wso2.carbon.endpoint.stub.types.service.EndpointMetaData[] getEndpointMetaDataSearch(int pageNumber, int endpointsPerPage, String searchText) throws ExceptionGet Metadata of all the Searched Endpoints in the Synapse configuration- Parameters:
pageNumber-endpointsPerPage-searchText-- Returns:
- Throws:
Exception
-
enableStatistics
public void enableStatistics(String name) throws Exception
Enable statistics collection for the specified endpoint- Parameters:
name- name of the endpoint- Throws:
Exception- in case of an error
-
disableStatistics
public void disableStatistics(String name) throws Exception
Stop collecting statistics for a specified endpoint- Parameters:
name- name of the endpoint- Throws:
Exception- in case of an error
-
addDynamicEndpoint
public void addDynamicEndpoint(String key, String epName) throws Exception
Add an endpoint to the Synapse registry- Parameters:
key- of the dynamic endpointepName- endpoint name- Throws:
Exception- in case of an error
-
saveDynamicEndpoint
public void saveDynamicEndpoint(String key, String epName) throws Exception
Save an endpoint to the Synapse registry- Parameters:
key- dynamic endpoint keyepName- endpoint name- Throws:
Exception- in case of an error
-
saveEndpoint
public void saveEndpoint(String epName) throws Exception
Save an endpoint- Parameters:
epName- endpoint name- Throws:
Exception- in case of an error
-
getEndpointCount
public int getEndpointCount() throws ExceptionGet the endpoint count- Returns:
- number of endpoints
- Throws:
Exception
-
getDynamicEndpointCount
public int getDynamicEndpointCount() throws ExceptionGet the dynamic endpoint count- Returns:
- number of dynamic endpoints
- Throws:
Exception
-
-