The Handler Framework
One way to characterise the overall behaviour of a service is in terms of the tasks that the service is designed to carry out. Interacting with a target service in the process of satisfying a client request is a common example of a task; monitoring some of the local resources at regular intervals is another. In many cases, modelling such tasks with dedicated components improves their maintainability and reusability. In particular, the same task components can be customised and reused in different parts of the service implementation or assembled in some guise to form more complex tasks. In recognition of these benefits, gCF defines a framework for task definition and management that builds upon a standardisation of tasks as gCube handlers.
Contents
Overview
The handler framework is defined by the inheritance hierarchy contained in the package org.gcube.common.core.utils.handlers
:
The high-level roles of package components is summarised below:
GCUBEIHandler
: the interface of all handlers.
GCUBEHandler
: the abstract base implementation ofGCUBEIHandler
.
GCUBEComplexHandler
: an abstract specialisation ofGCUBEHandler
of complex handlers, i.e handlers that manage other handlers.
GCUBEScheduledHandler
: a concrete specialisation ofGCUBEComplexHandler
for handlers that schedule the execution of other handlers.
GCUBEHandlerConnector
: a concrete specialisation ofGCUBEHandler
for handlers that connect the inputs and outputs of handlers chained by aGCUBEScheduledHandler
.
GCUBESequentialHandler
: a concrete specialisation ofGCUBEComplexHandler
for handlers that chain the execution of other handlers.
GCUBEParallelHandler
: a concrete specialisation ofGCUBEComplexHandler
for handlers that parallelise the execution of other handlers.
GCUBEServiceHandler
: an abstract specialisation ofGCUBEHandler
for handlers that engage in interactions with remote service port-types.
GCUBEStatefulServiceHandler
: an abstract specialisation ofGCUBEServiceHandler
for handlers that engage in interactions with remote WS-Resources.
GCUBEStagingServiceHandler
: an abstract specialisation ofGCUBEStatefulServiceHandler
for handlers that can stage the WS-resource with which they need to interact.
The framework also includes the following auxiliary packages:
handlers.events
: a package of auxiliary components related to the management of events produce by handlers.
handlers.lifetime
: a package of auxiliary components related to the management of the lifetime of handlers.
GCUBEHandler
[coming soon]
General-Purpose Handlers
[coming soon]
Sequential Handlers
[coming soon]
Parallel Handlers
[coming soon]
Scheduling Handlers
[coming soon]
Handlers for remote Interactions
[coming soon]
Service Handlers & the Client Interface
[coming soon]
Staging Service Handlers
[coming soon]