org.jcreme.processing
Interface RemoteProducer

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
RemoteProducerImpl

public interface RemoteProducer
extends java.rmi.Remote

This interface enables to remotely use a producer. Note that all the objects exchanged should be Serializable.

Version:
$Revision: 1.2 $
Author:
$Author: dbregeon $

Method Summary
 boolean isProductionOver()
          Returns true if the production is over, false if not.
 java.lang.Object nextItem()
          Returns the next item free for consumption.
 boolean produceItem()
          Produces next item, i.e. marks it as consumable.
 void setProductionOver(boolean bool)
          Sets a flag that shows whether the production is over.
 boolean validateItem(java.lang.Object theItem)
          Validates an item, i.e. marks it as having been consumed.
 

Method Detail

setProductionOver

public void setProductionOver(boolean bool)
                       throws java.rmi.RemoteException
Sets a flag that shows whether the production is over.

Parameters:
bool - The boolean value that the flag has to be set on.
Throws:
java.rmi.RemoteException - if an error occurs during communication.

isProductionOver

public boolean isProductionOver()
                         throws java.rmi.RemoteException
Returns true if the production is over, false if not.

Returns:
True if the production is over, false if not.
Throws:
java.rmi.RemoteException - if an error occurs during communication.

nextItem

public java.lang.Object nextItem()
                          throws java.rmi.RemoteException
Returns the next item free for consumption.

Returns:
The next item free for consumption.
Throws:
java.rmi.RemoteException - if an error occurs during communication.

validateItem

public boolean validateItem(java.lang.Object theItem)
                     throws java.rmi.RemoteException
Validates an item, i.e. marks it as having been consumed.

Parameters:
theItem - The item to be validated.
Returns:
true if the object was validated.
Throws:
java.rmi.RemoteException - if an error occurs during communication.

produceItem

public boolean produceItem()
                    throws java.rmi.RemoteException
Produces next item, i.e. marks it as consumable.

Returns:
True if there are still objects to produce, false otherwise.
Throws:
java.rmi.RemoteException - if an error occurs during communication.


Copyright 2006 null. All Rights Reserved.