## org.mortbay.cometd
Class Message

    java.lang.Object
      java.util.AbstractMap<K,V>
          java.util.HashMap<String,Object>
              org.mortbay.cometd.Message

All Implemented Interfaces:
  Serializable, Cloneable, Map<String,Object>, JSON.Generator

    public class Message

extends HashMap<String,Object>
implements JSON.Generator

A Bayeux Message A Map of String to Object that has been optimized for conversion to JSON messages.

Author:
  gregw
See Also:
  Serialized Form

Constructor Summary
`Message()`

Method Summary
`void` `addJSON(StringBuffer buffer)`
`void` `clear()`
`Set<Map.Entry<String,Object>>` `entrySet()`
`String` `getJSON()`
`Set<String>` `keySet()`
`Object` `put(String key, Object value)`
`void` `putAll(Map<? extends String,? extends Object> m)`
`Object` `remove(Object key)`

Methods inherited from class java.util.HashMap
`clone, containsKey, containsValue, get, isEmpty, size, values`

Methods inherited from class java.util.AbstractMap
`equals, hashCode, toString`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface java.util.Map
`equals, hashCode`

Constructor Detail

### Message

    public Message()

Method Detail

### addJSON

    public void addJSON(StringBuffer buffer)

  Specified by:
    `addJSON` in interface `JSON.Generator`

### getJSON

    public String getJSON()

### clear

    public void clear()

  Specified by:
    `clear` in interface `Map<String,Object>`
  Overrides:
    `clear` in class `HashMap<String,Object>`

### put

    public Object put(String key,
                      Object value)

  Specified by:
    `put` in interface `Map<String,Object>`
  Overrides:
    `put` in class `HashMap<String,Object>`

### putAll

    public void putAll(Map<? extends String,? extends Object> m)

  Specified by:
    `putAll` in interface `Map<String,Object>`
  Overrides:
    `putAll` in class `HashMap<String,Object>`

### remove

    public Object remove(Object key)

  Specified by:
    `remove` in interface `Map<String,Object>`
  Overrides:
    `remove` in class `HashMap<String,Object>`

### entrySet

    public Set<Map.Entry<String,Object>> entrySet()

  Specified by:
    `entrySet` in interface `Map<String,Object>`
  Overrides:
    `entrySet` in class `HashMap<String,Object>`

### keySet

    public Set<String> keySet()

  Specified by:
    `keySet` in interface `Map<String,Object>`
  Overrides:
    `keySet` in class `HashMap<String,Object>`

Copyright © 2007 Mort Bay Consulting. All Rights Reserved.