org.objectweb.dream.pushwithreturn
Class SynchronizerSynchronousImpl

java.lang.Object
  extended by org.objectweb.dream.AbstractComponent
      extended by org.objectweb.dream.pushwithreturn.SynchronizerSynchronousImpl
All Implemented Interfaces:
ContextualBindingController, NeedAsyncStartController, PrepareStopLifeCycleController, Loggable, Push, Push1, PushWithReturn, BindingController, LifeCycleController

public class SynchronizerSynchronousImpl
extends AbstractComponent
implements PushWithReturn, Push1

This component handles calls to the PushWithReturn.pushWithReturn(Message)method (i.e. outgoing messages). It has one PushWithReturninput, one Pushoutput, and one Push1input.

It receives calls to the pushWithReturn method. It generates a key for the message, then it pushes the message on its output, and waits for a message with the same key to arrive on its Push1 input. This message is the returned message of the pushWithReturn method.

Note 1: if a message with an "All" key is received on the input, it is used as a return message of all the pushWithReturn method calls currently waiting for a return message.

Note 2: if a return message does not correspond to a stored key, it is forwarded.


Field Summary
 
Fields inherited from class org.objectweb.dream.AbstractComponent
bindingLogger, fcNeedAsyncStart, fcState, lifeCycleLogger, logger, weaveableC
 
Fields inherited from interface org.objectweb.dream.PushWithReturn
IN_PUSH_WITH_RETURN_ITF_NAME, OUT_PUSH_WITH_RETURN_ITF_NAME
 
Fields inherited from interface org.objectweb.dream.Push
IN_PUSH_ITF_NAME, INCOMING_IN_PUSH_ITF_NAME, INCOMING_OUT_PUSH_ITF_NAME, OUT_PUSH_ITF_NAME, OUTGOING_IN_PUSH_ITF_NAME, OUTGOING_OUT_PUSH_ITF_NAME
 
Fields inherited from interface org.objectweb.dream.Push1
IN_PUSH_ITF_NAME, OUT_PUSH_ITF_NAME
 
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController
STARTED, STOPPED
 
Constructor Summary
SynchronizerSynchronousImpl()
           
 
Method Summary
 void bindFc(String clientItfName, Object serverItf)
           
 String[] listFc()
           
 void push(Message message)
           
 void push1(Message message)
           
 Message pushWithReturn(Message message)
           
 
Methods inherited from class org.objectweb.dream.AbstractComponent
beforeFirstStart, bindFc, getFcNeedAsyncStart, getFcState, initComponent, lookupFc, prepareStopFc, setLogger, startFc, stopFc, unbindFc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SynchronizerSynchronousImpl

public SynchronizerSynchronousImpl()
Method Detail

pushWithReturn

public Message pushWithReturn(Message message)
                       throws PushException
Specified by:
pushWithReturn in interface PushWithReturn
Throws:
PushException
See Also:
PushWithReturn.pushWithReturn(Message)

push

public void push(Message message)
          throws PushException
Specified by:
push in interface Push
Throws:
PushException
See Also:
Push.push(Message)

push1

public void push1(Message message)
           throws PushException
Specified by:
push1 in interface Push1
Throws:
PushException
See Also:
Push1.push1(Message)

bindFc

public void bindFc(String clientItfName,
                   Object serverItf)
            throws NoSuchInterfaceException,
                   IllegalBindingException,
                   IllegalLifeCycleException
Specified by:
bindFc in interface BindingController
Overrides:
bindFc in class AbstractComponent
Throws:
NoSuchInterfaceException
IllegalBindingException
IllegalLifeCycleException
See Also:
BindingController.bindFc(String, Object)

listFc

public String[] listFc()
Specified by:
listFc in interface BindingController
See Also:
BindingController.listFc()


Copyright © 2003, 2005 - INRIA Rhone-Alpes - All Rights Reserved.