## org.mortbay.cometd
Class MessagePool

    java.lang.Object
      org.mortbay.cometd.MessagePool

Direct Known Subclasses:
  AbstractBayeux

    public class MessagePool

extends java.lang.Object

Constructor Summary
`MessagePool()`
`MessagePool(int capacity)`

Method Summary
`JSON` `getBatchJSON()`
`JSON` `getJSON()`
`JSON` `getMsgJSON()`
`MessageImpl` `newMessage()`
`MessageImpl` `newMessage(org.cometd.Message associated)`
`org.cometd.Message[]` `parse(java.io.Reader reader)`
`org.cometd.Message[]` `parse(java.lang.String s)`
`void` `parseTo(java.lang.String fodder, java.util.List<org.cometd.Message> messages)`
`void` `setBatchJSON(JSON batchJSON)`
`void` `setJSON(JSON json)`
`void` `setMsgJSON(JSON msgJSON)`
`java.lang.String` `toString()`

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

Constructor Detail

### MessagePool

    public MessagePool()

### MessagePool

    public MessagePool(int capacity)

Method Detail

### getJSON

    public JSON getJSON()

  Returns:
    the `JSON` instance used to convert data and ext fields

### setJSON

    public void setJSON(JSON json)

  Parameters:
    `json` - the `JSON` instance used to convert data and ext fields

### getMsgJSON

    public JSON getMsgJSON()

  Returns:
    the `JSON` instance used to serialize and deserialize bayeux bayeux messages

### setMsgJSON

    public void setMsgJSON(JSON msgJSON)

  Parameters:
    `msgJSON` - the `JSON` instance used to serialize and deserialize bayeux messages

### getBatchJSON

    public JSON getBatchJSON()

  Returns:
    the `JSON` instance used to deserialize batches of bayeux messages

### setBatchJSON

    public void setBatchJSON(JSON batchJSON)

  Parameters:
    `batchJSON` - the `JSON` instance used to convert batches of bayeux messages

### newMessage

    public MessageImpl newMessage()

### newMessage

    public MessageImpl newMessage(org.cometd.Message associated)

### parse

    public org.cometd.Message[] parse(java.io.Reader reader)
                               throws java.io.IOException

  Throws:
    `java.io.IOException`

### parse

    public org.cometd.Message[] parse(java.lang.String s)
                               throws java.io.IOException

  Throws:
    `java.io.IOException`

### parseTo

    public void parseTo(java.lang.String fodder,
                        java.util.List<org.cometd.Message> messages)

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

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