org.spicefactory.cinnamon.io
Class MessageProcessor.ResultHolder<O>

java.lang.Object
  extended by org.spicefactory.cinnamon.io.MessageProcessor.ResultHolder<O>
Enclosing interface:
MessageProcessor<I,O>

public static class MessageProcessor.ResultHolder<O>
extends Object

Represents a single result produced by a MessageProcessor.

Author:
Jens Halm

Constructor Summary
MessageProcessor.ResultHolder(O result, boolean error)
          Creates a new ResultHolder instance.
 
Method Summary
 O getResult()
          Return the object representing the actual result
 boolean isError()
          Indicates whether the result wrapped by this instance represents an error outcome.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageProcessor.ResultHolder

public MessageProcessor.ResultHolder(O result,
                                     boolean error)
Creates a new ResultHolder instance.

Parameters:
result - the object representing the actual result
error - indicates whether the result represents an error outcome
Method Detail

isError

public boolean isError()
Indicates whether the result wrapped by this instance represents an error outcome.

Returns:
true if the result wrapped by this instance represents an error outcome

getResult

public O getResult()
Return the object representing the actual result

Returns:
the object representing the actual result