Package org.copperengine.core.util
Class BackchannelDefaultImpl
- java.lang.Object
-
- org.copperengine.core.util.BackchannelDefaultImpl
-
- All Implemented Interfaces:
Backchannel
public class BackchannelDefaultImpl extends java.lang.Object implements Backchannel
-
-
Constructor Summary
Constructors Constructor Description BackchannelDefaultImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
notify(java.lang.String correlationId, java.lang.Object payload)
Passes a response for the specified correlationId to the bachchannel.java.lang.Object
wait(java.lang.String correlationId, long timeout, java.util.concurrent.TimeUnit timeunit)
Waits for a response for the specified correlationId.
-
-
-
Method Detail
-
wait
public java.lang.Object wait(java.lang.String correlationId, long timeout, java.util.concurrent.TimeUnit timeunit) throws java.lang.InterruptedException
Description copied from interface:Backchannel
Waits for a response for the specified correlationId.- Specified by:
wait
in interfaceBackchannel
- Parameters:
correlationId
- unique correlation id to wait fortimeout
- timeouttimeunit
- timeunit of timeout- Returns:
- the response or
null
in case of a timeout. - Throws:
java.lang.InterruptedException
- Might be thrown from the internally used CountDownLatch await method.
-
notify
public void notify(java.lang.String correlationId, java.lang.Object payload)
Description copied from interface:Backchannel
Passes a response for the specified correlationId to the bachchannel.- Specified by:
notify
in interfaceBackchannel
- Parameters:
correlationId
- unique correlation idpayload
- the response object -null
value is allowed
-
-