dsto.dfc.swt.forms
Interface Pipe

All Superinterfaces:
Disposable
All Known Implementing Classes:
AbstractBiDiPipe, AbstractPipe, BeanEndpoint, ButtonEndpoint, DataObjectCopyPipe, JavaBeanPropertyPipe, LabelizerPipe, MultiPipe, NumberEndpoint, PipeEndpoint, PropertyPipe, RadioEndpoint, TextEndpoint, TranslatorPipe

public interface Pipe
extends Disposable

Defines a segment of a data flow pipe. A pipe accepts an input value (via input(Object)), optionally performs some translation, and passes the (possibly translated) value as the input to one or more child pipes that are connected to it (via connect(Pipe)). The child pipes may later output values back into the parent (via output(Object)).

Notes:

Version:
$Revision$
Author:
mpp

Method Summary
 Pipe connect(Pipe pipe)
          Connect the output of this pipe to the input of a child pipe.
 void dispose()
          Release any resources acquired by the pipe.
 boolean flush()
          Cause any uncommitted changes to any pipe segments in the tree to be pushed back into the pipe sequence (using output(Object)).
 Pipe getParent()
          Get the parent pipe.
 boolean input(Object value)
          Input a value into the pipe tree.
 boolean isDisposed()
          Test if pipe has been disposed.
 boolean output(Object value)
          Output a value from a child into the pipe (the reverse of input ()).
 void setErrorHandler(PipeErrorHandler handler)
          Set the handler for any errors encountered while loading/unloading the pipe.
 void setParent(Pipe pipe)
          Set the parent pipe.
 

Method Detail

flush

boolean flush()
Cause any uncommitted changes to any pipe segments in the tree to be pushed back into the pipe sequence (using output(Object)). This is designed for use by pipes connect editors such as text fields that are not committed immediately: most pipes will simply forward this call on to their children.

Returns:
True if the operation completed successfully.
See Also:
for more info on handling errors.

input

boolean input(Object value)
Input a value into the pipe tree.

Returns:
True if the operation completed successfully.
See Also:
for more info on handling errors.

output

boolean output(Object value)
Output a value from a child into the pipe (the reverse of input ()).

Returns:
True if the operation completed successfully.
See Also:
for more info on handling errors.

setParent

void setParent(Pipe pipe)
Set the parent pipe. The child should push new values back up the chain by calling its parent's output(Object) method.


getParent

Pipe getParent()
Get the parent pipe.

See Also:
setParent(Pipe)

connect

Pipe connect(Pipe pipe)
Connect the output of this pipe to the input of a child pipe.


setErrorHandler

void setErrorHandler(PipeErrorHandler handler)
Set the handler for any errors encountered while loading/unloading the pipe. This will also set the handler for all children.

See Also:
PipeErrorHandler

dispose

void dispose()
Release any resources acquired by the pipe.

Specified by:
dispose in interface Disposable

isDisposed

boolean isDisposed()
Test if pipe has been disposed.



Copyright © 2008 Commonwealth of Australia