The Handler Framework

From GCube System
Revision as of 15:55, 11 September 2009 by Fabio.simeoni (Talk | contribs)

Jump to: navigation, search

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.

Overview

The handler framework is defined by the inheritance hierarchy contained in the package org.gcube.common.core.utils.handlers:

Handlers.jpg

The high-level roles of package components is summarised below:

  • GCUBEIHandler: the interface of all handlers.
  • GCUBEHandler: the abstract base implementation of GCUBEIHandler.
  • GCUBEComplexHandler: an abstract specialisation of GCUBEHandler of complex handlers, i.e handlers that manage other handlers.
  • GCUBEScheduledHandler: a concrete specialisation of GCUBEComplexHandler for handlers that schedule the execution of other handlers.
  • GCUBEHandlerConnector: a concrete specialisation of GCUBEHandler for handlers that connect the inputs and outputs of handlers chained by a GCUBEScheduledHandler.
  • GCUBESequentialHandler: a concrete specialisation of GCUBEComplexHandler for handlers that chain the execution of other handlers.
  • GCUBEParallelHandler: a concrete specialisation of GCUBEComplexHandler for handlers that parallelise the execution of other handlers.
  • GCUBEServiceHandler: an abstract specialisation of GCUBEHandler for handlers that engage in interactions with remote service port-types.
  • GCUBEStatefulServiceHandler: an abstract specialisation of GCUBEServiceHandler for handlers that engage in interactions with remote WS-Resources.
  • GCUBEStagingServiceHandler: an abstract specialisation of GCUBEStatefulServiceHandler 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]