FileDocCategorySizeDatePackage
Advice.javaAPI DocGlassfish v2 API3788Fri May 04 22:36:58 BST 2007com.sun.grizzly.cometd.bayeux

Advice

public class Advice extends VerbBase
Bayeux Advise implementation. See http://svn.xantus.org/shortbus/trunk/bayeux/protocol.txt for the technical details. The advice system provides a way for servers to inform clients of their preferred mode of client operation. In conjunction with server-enforced limits, Bayeux implementations can prevent resource exhaustion and inelegant failure in several important edge cases. Since transport evenlopes are "pluggable" in order to support differing "on the wire" behaviors, advice values may also vary by transport type, even for the same conditions. What follows is a breif description of the enumerations that are used in advices and their canonical meanings.
author
Jeanfrancois Arcand

Fields Summary
private String
reconnect
private Integer
interval
private String
transport
Constructors Summary
public Advice()

    
    
      
        type = Verb.ADVISE;
    
Methods Summary
public java.lang.IntegergetInterval()

        return interval;
    
public java.lang.StringgetReconnect()

        return reconnect;
    
public java.lang.StringgetTransport()

        return transport;
    
public voidsetInterval(java.lang.Integer interval)

        this.interval = interval;
    
public voidsetReconnect(java.lang.String reconnect)

        this.reconnect = reconnect;
    
public voidsetTransport(java.lang.String transport)

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

        
        return "\"advice\":{" 
                + "\"reconnect\":\"" + reconnect + "\","
                + "\"interval\":" + interval + "}";         
    
public java.lang.StringtoString()

        return toJSON();