com.rhi.architecture.parc
Interface Channel

All Superinterfaces:
java.lang.Cloneable, Consumer, Supplier
All Known Implementing Classes:
AbstractChannel

public interface Channel
extends Consumer, Supplier, java.lang.Cloneable

The Channel interface represents the glue that ties processing elements together in the pipeline architecture. The channel is both a consumer and a supplier. Records can be 'put' into the channel by the supplier, and 'taken' out of the channel by the consumer. Credits: (1) Doug Lea's concurrency package. (2) Bundle Routing Architecture developed for Iridium.

Since:
1.0
Author:
Pete McKinstry

Method Summary
 java.lang.Object clone()
          Clone of this channel.
 java.util.Collection pull(int max)
          Extract a collection of records from the Channel up to the provided maximum record count.
 void push(java.util.Collection set)
          Place a collection of Records in the channel, blocking until they are all accepted.
 
Methods inherited from interface com.rhi.architecture.parc.Supplier
registerMonitor
 

Method Detail

push

public void push(java.util.Collection set)
          throws ProcessingException
Place a collection of Records in the channel, blocking until they are all accepted.

Specified by:
push in interface Consumer
Parameters:
set - - the group of records to be inserted.
Throws:
ProcessingException - - error adding records to the channel.
Since:
1.0

pull

public java.util.Collection pull(int max)
                          throws ProcessingException
Extract a collection of records from the Channel up to the provided maximum record count. This method can, but is not required to timeout after a certain period.

Specified by:
pull in interface Supplier
Parameters:
max - - the maximum number of records to pull from the channel.
Returns:
Collection - a set of records extracted from the channel.
Throws:
ProcessingException - - error extracting records from the channel.
Since:
1.0

clone

public java.lang.Object clone()
Clone of this channel. A clone() creates an identical Channel instance w/o any records. This is used by the framework to hookup Fitlers using a default channel implementation.

Returns:
Object copy of this Channel.
Since:
1.0


Copyright © 2002-2004 Robert Half International. All Rights Reserved.