|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface represents component which is able to manipulate with services.
Using ServiceAdministration
is possible to get list of running services, start/stop service, for specified service get its
package, manage state, IP Filter interceptor, message size interceptor and other custom
interceptors.
| Method Summary | |
void |
disableServiceInstance(ServiceInstance serviceInstance)
Disable given service instance. |
void |
enableServiceInstance(ServiceInstance serviceInstance)
Enable given service instance. |
java.lang.String[] |
getEndpointOperations(java.lang.String endpointPath)
Gets names of WSDL operations available for given web service endpoint path. |
Package |
getPackage(ServiceInstance serviceInstance)
Get package for given service instance. |
Version |
getServerVersion()
Get WSO2 SOA Enablement Server version. |
ServiceEndpointInfo |
getServiceEndpoint(ServiceEndpoint serviceEndpoint)
Gets service endpoint info. |
ServiceInstanceInfo |
getServiceInstance(ServiceInstance serviceInstance)
Gets service instance info. |
ServiceEndpointInfo[] |
getServiceInstanceEndpoints(ServiceInstance serviceInstance)
Gets service endpoints for given service instance in runtime. |
ServiceInstanceInfo[] |
getServiceInstances()
Gets all services instances in runtime. |
ServiceEndpointInfo[] |
getServiceInstancesEndpoints(ServiceInstance[] serviceInstances)
Gets services endpoints for given service instances in runtime. |
InterceptorInfo[] |
interceptorControl(ServiceEndpoint serviceEndpoint,
int controlOperation,
InterceptorInfo interceptorInfo)
Control service endpoint interceptors. |
IpFilterInfo |
ipFilterInterceptorControl(ServiceEndpoint serviceEndpoint,
int controlOperation,
boolean allowedByDefault,
IpFilterRule[] ipFilterRules)
Block or allow requests depending on the requestor's IP address for particular service endpoint. |
int |
messageSizeInterceptorControl(ServiceEndpoint serviceEndpoint,
int controlOperation,
int maxMessageLength)
Control message size checker interceptor. |
boolean |
polymorphismControl(ServiceEndpoint serviceEndpoint,
int controlOperation)
Control service endpoint polymorphism support. |
int |
serviceInstanceStateControl(ServiceInstance serviceInstance,
int controlOperation)
Control service instance state. |
void |
startServiceInstance(ServiceInstance serviceInstance)
Deprecated. since 4.5 use enableServiceInstance(org.systinet.wasp.admin.ServiceInstance) instead. |
void |
stopServiceInstance(ServiceInstance serviceInstance)
Forces service instance to go to Disabled without waiting
for the active request to complete. |
| Method Detail |
public Version getServerVersion()
public ServiceInstanceInfo[] getServiceInstances()
throws AdminServiceException
AdminServiceException
public ServiceInstanceInfo getServiceInstance(ServiceInstance serviceInstance)
throws AdminServiceException
serviceInstance - a service instance descriptor.
null if the service instance doesn't exist.
AdminServiceException
public int serviceInstanceStateControl(ServiceInstance serviceInstance,
int controlOperation)
throws AdminServiceException
serviceInstance - a service instance.controlOperation - may be one of the following:
START: start the service instance.
STOP: stop the service instance.
ENABLE: enable the service instance.
DISABLE: disable the service instance.
GET: get the service instance state.
GET operation returns service instance state,
else returns -1.
AdminServiceExceptionControlOperations
public void enableServiceInstance(ServiceInstance serviceInstance)
throws AdminServiceException
serviceInstance - a service instance descriptor.
AdminServiceException
public void disableServiceInstance(ServiceInstance serviceInstance)
throws AdminServiceException
serviceInstance - a service instance descriptor.
AdminServiceException
public void startServiceInstance(ServiceInstance serviceInstance)
throws AdminServiceException
enableServiceInstance(org.systinet.wasp.admin.ServiceInstance) instead.
serviceInstance - a service instance descriptor.
AdminServiceException
public void stopServiceInstance(ServiceInstance serviceInstance)
throws AdminServiceException
Disabled without waiting
for the active request to complete. The active connections are abandoned.
Furthermore, if service instance implements Initializable,
destroy is NOT processed.
This method is legal only for service instance in the Enabled and
Active states.
Note: use with care - this method is unsafe and does not terminate active connections properly. It can thus lead to unpredictable behavior. This method is blocking.
AdminServiceException
public ServiceEndpointInfo[] getServiceInstanceEndpoints(ServiceInstance serviceInstance)
throws AdminServiceException
serviceInstance - a service instance descriptor.
AdminServiceException
public java.lang.String[] getEndpointOperations(java.lang.String endpointPath)
throws AdminServiceException
endpointPath - endpoint path, like "/HelloWorldService"
AdminServiceException
public ServiceEndpointInfo[] getServiceInstancesEndpoints(ServiceInstance[] serviceInstances)
throws AdminServiceException
serviceInstances - a service instance descriptor.
AdminServiceException
public ServiceEndpointInfo getServiceEndpoint(ServiceEndpoint serviceEndpoint)
throws AdminServiceException
serviceEndpoint - given service endpoint descriptor.
AdminServiceException
public InterceptorInfo[] interceptorControl(ServiceEndpoint serviceEndpoint,
int controlOperation,
InterceptorInfo interceptorInfo)
throws AdminServiceException
serviceEndpoint - target service endpoint.controlOperation - may be one of the following:
GET_ALL: returns list of known interceptors managed by interceptor
repository (service endpoint parameter is ignored) which
are loaded into runtime.
GET: returns list of interceptors assigned to given
service endpoint.
ADD: interceptor to given position (default 0), intercepting
in given directions.
REMOVE: remove interceptor.
REMOVE_ALL: remove all the application level interceptors.
STORE: store current interceptor chain of the endpoint into configuration
(persistence).
interceptorInfo - interceptor info structure which holds interceptor name, position
within interceptor chain and directions.
ADD operation interceptor name must be specified;
position and direction are optional fields. Default value (0)
for position is to intercept in both direction, and for position
means the first position in interceptor chain.
REMOVE operation interceptor name must be specified
and directions and position fields are ignored (it is presumed that
interceptor name is unique).
GET, GET_ALL and REMOVE_ALL
operations is this parameter ignored.
GET operation returns interceptor list for the service endpoint;
on GET_ALL operation returns a list of InterceptorInfo structures
where is only the name valid. For other operations returns null.
AdminServiceExceptionControlOperations,
InterceptorInfo
public int messageSizeInterceptorControl(ServiceEndpoint serviceEndpoint,
int controlOperation,
int maxMessageLength)
throws AdminServiceException
Changes made using this method to the service endpoint interceptor
chain are transient. To make the use of message size interceptor permanent,
you must store the interceptor chain for the service endpoint using the
interceptorControl(org.systinet.wasp.admin.ServiceEndpoint, int, org.systinet.wasp.admin.InterceptorInfo) method.
serviceEndpoint - target service endpoint.controlOperation - may be one of the following:
GET: returns the message size checker interceptor limit.
If the interceptor is not present within the chain,
-1 is returned.
ADD: set the message size length interceptor for this service endpoint.
REMOVE: remove the message length interceptor.
-1 if limit is unknown.
AdminServiceExceptionControlOperations
public IpFilterInfo ipFilterInterceptorControl(ServiceEndpoint serviceEndpoint,
int controlOperation,
boolean allowedByDefault,
IpFilterRule[] ipFilterRules)
throws AdminServiceException
serviceEndpoint - target service endpoint.controlOperation - may be one of the following:
GET: return interceptor's default behaviour and the list of filtering rules
for target service endpoint.
ADD: set the IP filter interceptor for the target service endpoint. If
the IP filter interceptor was already used by this service endpoint in the past, then
its original configuration - filtering rules - are reused when rules
provided on ADD operation are not specified (ipFilterRules
parameter is null).
REMOVE: remove the IP filter interceptor. Note that the interceptor
configuration remains in the config and can be resurrected on ADD operation.
ADD_RULE: add the filtering rule.
REMOVE_RULE: remove the filtering rule.
allowedByDefault - decide whether all request are allowed or forbidden by default.ipFilterRules - filtering rules used by the interceptor. On ADD operation
you may pass an array of rules or just leave it null. When
performing ADD_RULE or REMOVE_RULE operations
just one rule can be passed to this method.
GET operation IP filter info for interceptor associated with
target service endpoint is returned. If IP filter interceptor is not installed, then
null is returned.
AdminServiceExceptionControlOperations,
IPFilterInterceptor
public Package getPackage(ServiceInstance serviceInstance)
throws AdminServiceException
serviceInstance - source service instance.
AdminServiceException
public boolean polymorphismControl(ServiceEndpoint serviceEndpoint,
int controlOperation)
throws AdminServiceException
serviceEndpoint - target service endpoint.controlOperation - may be one of the following:
GET: determine whether endpoint polymorphism support is enabled.
ENABLE: enable polymorphism support for this endpoint.
DISABLE: disable polymorphism support for this endpoint.
GET operation returns true if service
endpoint polymorphism support is enabled, else it returns false.
AdminServiceExceptionControlOperations
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||