Difference between revisions of "The Handler Framework"

From GCube System
Jump to: navigation, search
(Overview)
Line 7: Line 7:
 
[[Image:handlers.jpg]]
 
[[Image:handlers.jpg]]
  
The high-level roles of package components is summarised below:
+
The high-level roles of package components are summarised below:
  
 
*<code>GCUBEIHandler</code>: the interface of all handlers.
 
*<code>GCUBEIHandler</code>: the interface of all handlers.
Line 13: Line 13:
 
*<code>GCUBEHandler</code>: the abstract base implementation of <code>GCUBEIHandler</code>.
 
*<code>GCUBEHandler</code>: the abstract base implementation of <code>GCUBEIHandler</code>.
  
*<code>GCUBEComplexHandler</code>: an abstract specialisation of <code>GCUBEHandler</code> of ''complex handlers'', i.e handlers that manage other handlers.
+
*<code>GCUBEComplexHandler</code>: an abstract specialisation of <code>GCUBEHandler</code> for ''complex handlers'', i.e handlers that manage other handlers.
  
 
*<code>GCUBEScheduledHandler</code>: a concrete specialisation of <code>GCUBEComplexHandler</code> for handlers that schedule the execution of other handlers.
 
*<code>GCUBEScheduledHandler</code>: a concrete specialisation of <code>GCUBEComplexHandler</code> for handlers that schedule the execution of other handlers.
 
*<code>GCUBEHandlerConnector</code>: a concrete specialisation of <code>GCUBEHandler</code> for handlers that connect the inputs and outputs of handlers chained by a <code>GCUBEScheduledHandler</code>.
 
  
 
*<code>GCUBESequentialHandler</code>: a concrete specialisation of <code>GCUBEComplexHandler</code> for handlers that chain the execution of other handlers.
 
*<code>GCUBESequentialHandler</code>: a concrete specialisation of <code>GCUBEComplexHandler</code> for handlers that chain the execution of other handlers.
 +
 +
*<code>GCUBEHandlerConnector</code>: a concrete specialisation of <code>GCUBEHandler</code> for handlers that connect the inputs and outputs of handlers chained by a <code>GCUBEScheduledHandler</code>.
  
 
*<code>GCUBEParallelHandler</code>: a concrete specialisation of <code>GCUBEComplexHandler</code> for handlers that parallelise the execution of other handlers.
 
*<code>GCUBEParallelHandler</code>: a concrete specialisation of <code>GCUBEComplexHandler</code> for handlers that parallelise the execution of other handlers.
Line 31: Line 31:
 
The framework also includes the following auxiliary packages:
 
The framework also includes the following auxiliary packages:
 
   
 
   
*<code>handlers.events</code>: a package of auxiliary components related to the management of events produce by handlers.
+
*<code>handlers.events</code>: a package of components related to the management of events produced by handlers.
  
*<code>handlers.lifetime</code>: a package of auxiliary components related to the management of the lifetime of handlers.
+
*<code>handlers.lifetime</code>: a package of components related to the management of the lifetime of handlers.
  
 
== GCUBEHandler ==
 
== GCUBEHandler ==

Revision as of 16:59, 11 September 2009

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 are summarised below:

  • GCUBEIHandler: the interface of all handlers.
  • GCUBEHandler: the abstract base implementation of GCUBEIHandler.
  • GCUBEComplexHandler: an abstract specialisation of GCUBEHandler for complex handlers, i.e handlers that manage other handlers.
  • GCUBEScheduledHandler: a concrete specialisation of GCUBEComplexHandler for handlers that schedule the execution of other handlers.
  • GCUBESequentialHandler: a concrete specialisation of GCUBEComplexHandler for handlers that chain 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.
  • 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 components related to the management of events produced by handlers.
  • handlers.lifetime: a package of 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]