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

Connect

public class Connect extends VerbBase
Bayeux Connect implementation. See http://svn.xantus.org/shortbus/trunk/bayeux/protocol.txt for the technical details. // here's what the client then POST's: //----------------- // CLIENT -> SERVER //----------------- [ { "channel": "/meta/connect", "clientId": "SOME_UNIQUE_CLIENT_ID", "connectionType": "iframe", // optional "authToken":"SOME_NONCE_PREVIOUSLY_PROVIDED_BY_SERVER" } // , ... ] // NOTE: data should be POSTed with an encoding of // application/x-www-form-urlencoded, and the preceeding payload is // expected to be stored in the "message" parameter // the server now replies with the preamble followed by any number of // messages encoded in the tunnel-specific envelope: //----------------- // SERVER -> CLIENT //----------------- Comet -- cleaning up web development
...
author
Jeanfrancois Arcand

Fields Summary
public static final String
HTML_HEADER
public static final String
DATA_WRAPPER_HEADER
public static final String
DATA_WRAPPER_FOOTER
public static final String
META_CONNECTIONS
protected String
clientId
protected String
connectionType
protected String
timestamp
Constructors Summary
public Connect()

    
    
      
        type = Verb.CONNECT;
    
Methods Summary
public java.lang.StringgetClientId()

        return clientId;
    
public java.lang.StringgetConnectionType()

        return connectionType;
    
public voidsetClientId(java.lang.String clientId)

        this.clientId = clientId;
    
public voidsetConnectionType(java.lang.String connectionType)

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

            
        return "[{" 
                + "\"timestamp\":\"" + FastHttpDateFormat.getCurrentDate() + "\","
                + "\"error\":\"" + error + "\","
                + "\"successful\":" + successful + ","                
                + "\"channel\":\"" + channel + "\""
                + "}]\n" ;