FileDocCategorySizeDatePackage
Ext.javaAPI DocGlassfish v2 API1960Tue Jun 19 17:49:08 BST 2007com.sun.grizzly.cometd.bayeux

Ext

public class Ext extends VerbBase
Bayeux extension element.
author
Jeanfrancois Arcand

Fields Summary
private Map
extensionMap
Constructors Summary
public Ext()

    
Methods Summary
public java.util.MapgetExtensionMap()

        return extensionMap;
    
public voidsetExtensionMap(java.util.Map extensionMap)

        this.extensionMap = extensionMap;
    
public java.lang.StringtoJSON()

        
        StringBuffer buf = new StringBuffer();
        Iterator<String> iterator = extensionMap.keySet().iterator();
        String key;
        boolean first = true;
        while (iterator.hasNext()){
            if (!first){
                buf.append(",");
            }
            first = false;
            key = iterator.next();
            buf.append("\"" + key
                + "\":" + extensionMap.get(key));
        }
                
        return "\"ext\":{" 
                + buf.toString()
                + "}";