|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
org.jcreme.processing.RemoteProducerImpl
This implementation of the RemoteProducer enables to export any Producer through RMI. Note that the exchanged Objects must be Serializable.
Field Summary | |
(package private) static long |
serialVersionUID
|
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Constructor Summary | |
RemoteProducerImpl(Producer producer)
Creates a new RemoteProducerImpl. |
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. |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
static final long serialVersionUID
Constructor Detail |
public RemoteProducerImpl(Producer producer) throws java.lang.IllegalArgumentException, java.rmi.RemoteException
producer
- the producer to be exposed through RMI.
java.lang.IllegalArgumentException
- when the producer parameter is null.
java.rmi.RemoteException
- if an error occurs during communication.Method Detail |
public void setProductionOver(boolean bool)
RemoteProducer
setProductionOver
in interface RemoteProducer
bool
- The boolean value that the flag has to be set on.RemoteProducer.setProductionOver(boolean)
public boolean isProductionOver()
RemoteProducer
isProductionOver
in interface RemoteProducer
RemoteProducer.isProductionOver()
public java.lang.Object nextItem()
RemoteProducer
nextItem
in interface RemoteProducer
RemoteProducer.nextItem()
public boolean validateItem(java.lang.Object theItem)
RemoteProducer
validateItem
in interface RemoteProducer
theItem
- The item to be validated.
RemoteProducer.validateItem(java.lang.Object)
public boolean produceItem()
RemoteProducer
produceItem
in interface RemoteProducer
RemoteProducer.produceItem()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |