org.krakenapps.filter.impl
Class DefaultMessage

java.lang.Object
  extended by org.krakenapps.filter.impl.DefaultMessage
All Implemented Interfaces:
Message

public class DefaultMessage
extends java.lang.Object
implements Message

This class provides default implementation for the Message interface.

Since:
1.0.0
Author:
xeraph

Constructor Summary
DefaultMessage(Message message)
           
DefaultMessage(MessageSpec spec, java.util.Map<java.lang.String,java.lang.Object> fields, java.util.Map<java.lang.String,java.lang.Object> headers)
           
 
Method Summary
 boolean containsHeader(java.lang.String key)
          Checks if specific header is contained.
 boolean containsKey(java.lang.String key)
          Checks if specific key is contained.
 java.lang.Object get(java.lang.String key)
          Returns the value of the property
 java.lang.Object getHeader(java.lang.String key)
          Returns the value of the header.
 MessageSpec getMessageSpec()
          Returns the message specification.
 java.util.Set<java.lang.String> headerKeySet()
          Returns a Set of header keys.
 java.util.Set<java.lang.String> keySet()
          Returns a Set of property keys.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMessage

public DefaultMessage(MessageSpec spec,
                      java.util.Map<java.lang.String,java.lang.Object> fields,
                      java.util.Map<java.lang.String,java.lang.Object> headers)

DefaultMessage

public DefaultMessage(Message message)
Method Detail

headerKeySet

public java.util.Set<java.lang.String> headerKeySet()
Description copied from interface: Message
Returns a Set of header keys.

Specified by:
headerKeySet in interface Message

keySet

public java.util.Set<java.lang.String> keySet()
Description copied from interface: Message
Returns a Set of property keys.

Specified by:
keySet in interface Message

get

public java.lang.Object get(java.lang.String key)
Description copied from interface: Message
Returns the value of the property

Specified by:
get in interface Message
Parameters:
key - the name of property

getHeader

public java.lang.Object getHeader(java.lang.String key)
Description copied from interface: Message
Returns the value of the header.

Specified by:
getHeader in interface Message
Parameters:
key - the name of header
Returns:
the value of the header. null if not exists.

getMessageSpec

public MessageSpec getMessageSpec()
Description copied from interface: Message
Returns the message specification.

Specified by:
getMessageSpec in interface Message

containsHeader

public boolean containsHeader(java.lang.String key)
Description copied from interface: Message
Checks if specific header is contained.

Specified by:
containsHeader in interface Message
Parameters:
key - the name of header
Returns:
true if header key exists

containsKey

public boolean containsKey(java.lang.String key)
Description copied from interface: Message
Checks if specific key is contained.

Specified by:
containsKey in interface Message
Parameters:
key - the name of property
Returns:
true if key exists.


Copyright © 2008-2009 Kraken Project. All Rights Reserved.