## org.mortbay.cometd
Class MessageImpl

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

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.Object>, org.cometd.Message, JSON.Generator

    public class MessageImpl

extends java.util.HashMap<java.lang.String,java.lang.Object>
implements org.cometd.Message, JSON.Generator

See Also:
  Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from class java.util.AbstractMap
`java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>`

Nested classes/interfaces inherited from interface java.util.Map
`java.util.Map.Entry<K,V>`

Constructor Summary
`MessageImpl()`
`MessageImpl(MessagePool bayeux)`

Method Summary
`void` `addJSON(java.lang.StringBuffer buffer)`
`void` `clear()`
`java.lang.Object` `clone()`
`void` `decRef()`
`java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>>` `entrySet()`
`org.cometd.Message` `getAssociated()`
`java.nio.ByteBuffer` `getBuffer()`
`java.lang.String` `getChannel()`
`java.lang.String` `getClientId()`
`java.lang.Object` `getData()`
`java.util.Map<java.lang.String,java.lang.Object>` `getExt(boolean create)`
`java.lang.String` `getId()`
`java.lang.String` `getJSON()`
`int` `getRefs()`
`void` `incRef()`
`boolean` `isLazy()` Lazy messages are queued but do not wake up waiting clients.
`boolean` `isSuccessful()`
`java.util.Set<java.lang.String>` `keySet()`
`java.lang.Object` `put(java.lang.String key, java.lang.Object value)`
`void` `putAll(java.util.Map<? extends java.lang.String,? extends java.lang.Object> m)`
`java.lang.Object` `remove(java.lang.Object key)`
`void` `setAssociated(org.cometd.Message associated)`
`void` `setBuffer(java.nio.ByteBuffer buffer)`
`void` `setLazy(boolean lazy)` Lazy messages are queued but do not wake up waiting clients.
`java.lang.String` `toString()`

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

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

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

Methods inherited from interface java.util.Map
`containsKey, containsValue, equals, get, hashCode, isEmpty, size, values`

Constructor Detail

### MessageImpl

    public MessageImpl()

### MessageImpl

    public MessageImpl(MessagePool bayeux)

Method Detail

### addJSON

    public void addJSON(java.lang.StringBuffer buffer)

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

### clear

    public void clear()

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

### clone

    public java.lang.Object clone()

  Specified by:
    `clone` in interface `org.cometd.Message`
  Overrides:
    `clone` in class `java.util.HashMap<java.lang.String,java.lang.Object>`

### decRef

    public void decRef()

### entrySet

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

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

### getAssociated

    public org.cometd.Message getAssociated()

  Specified by:
    `getAssociated` in interface `org.cometd.Message`

### getBuffer

    public java.nio.ByteBuffer getBuffer()

### getChannel

    public java.lang.String getChannel()

  Specified by:
    `getChannel` in interface `org.cometd.Message`

### getClientId

    public java.lang.String getClientId()

  Specified by:
    `getClientId` in interface `org.cometd.Message`

### getData

    public java.lang.Object getData()

  Specified by:
    `getData` in interface `org.cometd.Message`

### getExt

    public java.util.Map<java.lang.String,java.lang.Object> getExt(boolean create)

  Specified by:
    `getExt` in interface `org.cometd.Message`

### getId

    public java.lang.String getId()

  Specified by:
    `getId` in interface `org.cometd.Message`

### getJSON

    public java.lang.String getJSON()

### getRefs

    public int getRefs()

### incRef

    public void incRef()

### isLazy

    public boolean isLazy()

  Lazy messages are queued but do not wake up waiting clients.

  Returns:
    true if message is lazy

### isSuccessful

    public boolean isSuccessful()

### keySet

    public java.util.Set<java.lang.String> keySet()

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

### put

    public java.lang.Object put(java.lang.String key,
                                java.lang.Object value)

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

### putAll

    public void putAll(java.util.Map<? extends java.lang.String,? extends java.lang.Object> m)

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

### remove

    public java.lang.Object remove(java.lang.Object key)

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

### setAssociated

    public void setAssociated(org.cometd.Message associated)

### setBuffer

    public void setBuffer(java.nio.ByteBuffer buffer)

  Parameters:
    `buffer` - A cached buffer containing HTTP response headers and message content, to be reused when sending one message to multiple clients

### setLazy

    public void setLazy(boolean lazy)

  Lazy messages are queued but do not wake up waiting clients.

  Parameters:
    `lazy` - true if message is lazy

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.util.AbstractMap<java.lang.String,java.lang.Object>`

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.