org.atmosphere.wasync
Class Decoder.Decoded<T>

java.lang.Object
  extended by org.atmosphere.wasync.Decoder.Decoded<T>
Type Parameters:
T -
Enclosing interface:
Decoder<U,T>

public static final class Decoder.Decoded<T>
extends Object

A Decoder may return an instance of a Decoded object to prevent some messages from being delivered to a Function, by returning a ABORT instance. Returning an instance of Decoded with the action set to Decoder.Decoded.ACTION.CONTINUE will allow dispatching messages to Function


Nested Class Summary
static class Decoder.Decoded.ACTION
           
 
Field Summary
static Decoder.Decoded ABORT
          Use this object to prevent the delivering of messages to Function
 
Constructor Summary
Decoder.Decoded(T decodedMessage)
          Create a decoded object with action set to Decoder.Decoded.ACTION.CONTINUE
Decoder.Decoded(T decodedMessage, Decoder.Decoded.ACTION action)
          Create a decoded object
 
Method Summary
 Decoder.Decoded.ACTION action()
          Return the action.
 T decoded()
          Return the decoded message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ABORT

public static final Decoder.Decoded ABORT
Use this object to prevent the delivering of messages to Function

Constructor Detail

Decoder.Decoded

public Decoder.Decoded(T decodedMessage,
                       Decoder.Decoded.ACTION action)
Create a decoded object

Parameters:
decodedMessage - the decoded message
action - the action

Decoder.Decoded

public Decoder.Decoded(T decodedMessage)
Create a decoded object with action set to Decoder.Decoded.ACTION.CONTINUE

Parameters:
decodedMessage -
Method Detail

decoded

public T decoded()
Return the decoded message.

Returns:
the decoded message.

action

public Decoder.Decoded.ACTION action()
Return the action.

Returns:
the action.


Copyright © 2013. All Rights Reserved.