Package org.cyclos.services.access
Interface ServiceFacade
-
public interface ServiceFacadeA facade used to invoke service methods from web clients
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcloseSubscription(String id)Permanently closes the push notification subscription with the given idStringgetResourceCacheKey()Returns a string which can be used to control cache of resources regarding this Cyclos version / compilationResponseInfohandleInboundSms(RequestData requestData)Handles an inbound SMS request, returning the response which should be returned to the gatewayInvocationResultinvoke(InvocationData data)Invokes a service method according to the givenInvocationDataRequestDataresolveRequestData(boolean proxy, String protocol, String remoteAddress, String rootUrl, String uri)Returns the route data about a given request URI.ResponseInforunCustomWebService(InvocationData invocationData)Run a custom web service according to the configured authentication mechanism: either guest with no auth, guest with basic auth (fixed username / password) or logged user.Stringsubscribe(InvocationData invocation, String clientId, PushNotificationEventFilter filter, Consumer<PushNotificationEvent<?>> listener)Subscribes a push notifications listener for a given client id, returning a subscription idvoidtimeoutSubscription(String id)Marks the given push notification subscription as timed-out.
-
-
-
Method Detail
-
closeSubscription
void closeSubscription(String id)
Permanently closes the push notification subscription with the given id
-
getResourceCacheKey
String getResourceCacheKey()
Returns a string which can be used to control cache of resources regarding this Cyclos version / compilation
-
handleInboundSms
ResponseInfo handleInboundSms(RequestData requestData)
Handles an inbound SMS request, returning the response which should be returned to the gateway
-
invoke
InvocationResult invoke(InvocationData data) throws FrameworkException, BusinessException, IllegalInvocationException
Invokes a service method according to the givenInvocationData
-
resolveRequestData
RequestData resolveRequestData(boolean proxy, String protocol, String remoteAddress, String rootUrl, String uri) throws FrameworkException
Returns the route data about a given request URI. The return will contain the matched network id and internal name (if not on global mode), the resolved configuration id (if null, should be handled as a not found on client) and the final URI always starting with '/' (after removing the network root path and guest configuration key)- Throws:
FrameworkException
-
runCustomWebService
ResponseInfo runCustomWebService(InvocationData invocationData) throws FrameworkException, BusinessException
Run a custom web service according to the configured authentication mechanism: either guest with no auth, guest with basic auth (fixed username / password) or logged user.- Throws:
FrameworkExceptionBusinessException
-
subscribe
String subscribe(InvocationData invocation, String clientId, PushNotificationEventFilter filter, Consumer<PushNotificationEvent<?>> listener)
Subscribes a push notifications listener for a given client id, returning a subscription id
-
timeoutSubscription
void timeoutSubscription(String id)
Marks the given push notification subscription as timed-out. It means it will enqueue missed events, so if a new reconnection with the same client id shows up, it will send all missed events.
-
-