com.sun.grizzly.cometd.bayeux
Class Advice

java.lang.Object
  extended by com.sun.grizzly.cometd.bayeux.VerbBase
      extended by com.sun.grizzly.cometd.bayeux.Advice
All Implemented Interfaces:
Verb

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

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.sun.grizzly.cometd.bayeux.Verb
Verb.Type
 
Field Summary
 
Fields inherited from class com.sun.grizzly.cometd.bayeux.VerbBase
advice, authToken, channel, data, dataId, error, ext, first, follow, id, last, successful, type
 
Constructor Summary
Advice()
           
 
Method Summary
 String[] getHosts()
           
 Integer getInterval()
           
 Boolean getMultipleClients()
           
 String getReconnect()
           
 String getTransport()
           
 boolean isValid()
          Check whether the Verb is valid.
 void setHosts(String[] hosts)
           
 void setInterval(Integer interval)
           
 void setMultipleClients(Boolean multipleClients)
           
 void setReconnect(String reconnect)
           
 void setTransport(String transport)
           
 String toJSON()
          Return the JSON representation of the Verb.
 String toString()
           
 
Methods inherited from class com.sun.grizzly.cometd.bayeux.VerbBase
getAdvice, getAuthToken, getChannel, getData, getDataId, getExt, getId, getJSONPostfix, getJSONPrefix, getType, hasValidAdvice, isFirst, isFollow, isLast, setAdvice, setAuthToken, setChannel, setData, setDataId, setExt, setFirst, setFollow, setId, setLast
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Advice

public Advice()
Method Detail

getReconnect

public String getReconnect()

setReconnect

public void setReconnect(String reconnect)

getInterval

public Integer getInterval()

setInterval

public void setInterval(Integer interval)

getMultipleClients

public Boolean getMultipleClients()

setMultipleClients

public void setMultipleClients(Boolean multipleClients)

getHosts

public String[] getHosts()

setHosts

public void setHosts(String[] hosts)

toString

public String toString()
Overrides:
toString in class VerbBase

toJSON

public String toJSON()
Description copied from interface: Verb
Return the JSON representation of the Verb.


getTransport

public String getTransport()

setTransport

public void setTransport(String transport)

isValid

public boolean isValid()
Description copied from interface: Verb
Check whether the Verb is valid.

Specified by:
isValid in interface Verb
Overrides:
isValid in class VerbBase


Copyright © 2008 SUN Microsystems. All Rights Reserved.