Package org.km3net.clb.remote.msg
Class ResponseBatch
- java.lang.Object
-
- org.km3net.clb.remote.msg.ResponseBatch
-
public class ResponseBatch extends java.lang.Object
This class can be used to batch responses if you wish to execute a sequence of commands. All response objects are stored, and when exec() is called the results are fetched. Exceptions are delayed until all responses have been queried and thrown as a CommandsException.
-
-
Constructor Summary
Constructors Constructor Description ResponseBatch()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.Object>
exec()
Results a list of result objects, which may be null, or CommandExceptions if something horrible happened.void
q(Response<?> resp)
Queues a response in the batch.
-
-
-
Method Detail
-
q
public void q(Response<?> resp)
Queues a response in the batch.
-
exec
public java.util.List<java.lang.Object> exec()
Results a list of result objects, which may be null, or CommandExceptions if something horrible happened.- Returns:
- A list of resulting objects, or CommandException objects.
-
-