com.sun.grizzly.cometd.bayeux
Class VerbBase

java.lang.Object
  extended by com.sun.grizzly.cometd.bayeux.VerbBase
All Implemented Interfaces:
Verb
Direct Known Subclasses:
Advice, ConnectRequest, ConnectResponse, Data, DeliverResponse, DisconnectRequest, DisconnectResponse, Ext, HandshakeRequest, HandshakeResponse, Ping, PublishRequest, PublishResponse, ReconnectRequest, ReconnectResponse, Status, SubscribeRequest, SubscribeResponse, UnsubscribeRequest, UnsubscribeResponse

public abstract class VerbBase
extends Object
implements Verb

Abstract Verb implementation shared by all meta channel verb. All cometd /meta/ channel messages contain a protocol version number and all messages generated from (or routed through) an event router contain a message ID which is unique to the router. No randomness is required in these identifiers although routers are expected to drop messages which they have previously "seen".

Author:
Jeanfrancois Arcand

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.sun.grizzly.cometd.bayeux.Verb
Verb.Type
 
Field Summary
protected  Advice advice
           
static String ARRAY_END
           
static String ARRAY_START
           
protected  String authToken
           
protected  String channel
           
protected  String clientId
           
protected  Data data
           
protected  String dataId
           
protected  String error
           
protected  Ext ext
           
protected  boolean first
           
protected  boolean follow
           
protected  String id
           
protected  boolean last
           
protected  String metaChannel
           
protected  Boolean successful
           
protected  Verb.Type type
           
 
Constructor Summary
VerbBase()
           
 
Method Summary
 Advice getAdvice()
           
 String getAuthToken()
           
 String getChannel()
           
 String getClientId()
           
 Data getData()
           
 String getDataId()
           
 Ext getExt()
           
 String getId()
           
protected  String getJSONPostfix()
           
protected  String getJSONPrefix()
           
 String getMetaChannel()
          To be overriden by subclass used in isValid().
 Verb.Type getType()
          Return the Verb's type.
 boolean hasValidAdvice()
          Since advice is optional, null advice is valid.
 boolean isFirst()
           
 boolean isFollow()
           
 boolean isLast()
           
 boolean isValid()
          Check whether the Verb is valid.
 void setAdvice(Advice advice)
           
 void setAuthToken(String autheToken)
           
 void setChannel(String channel)
           
 void setClientId(String clientId)
           
 void setData(Data data)
           
 void setDataId(String dataId)
           
 void setExt(Ext ext)
           
 void setFirst(boolean first)
           
 void setFollow(boolean follow)
           
 void setId(String id)
           
 void setLast(boolean last)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sun.grizzly.cometd.bayeux.Verb
toJSON
 

Field Detail

ARRAY_START

public static final String ARRAY_START
See Also:
Constant Field Values

ARRAY_END

public static final String ARRAY_END
See Also:
Constant Field Values

id

protected String id

dataId

protected String dataId

advice

protected Advice advice

channel

protected String channel

data

protected Data data

type

protected Verb.Type type

authToken

protected String authToken

successful

protected Boolean successful

error

protected String error

ext

protected Ext ext

first

protected boolean first

follow

protected boolean follow

last

protected boolean last

clientId

protected String clientId

metaChannel

protected String metaChannel
Constructor Detail

VerbBase

public VerbBase()
Method Detail

getChannel

public String getChannel()

setChannel

public void setChannel(String channel)

getAuthToken

public String getAuthToken()

setAuthToken

public void setAuthToken(String autheToken)

getType

public Verb.Type getType()
Description copied from interface: Verb
Return the Verb's type.

Specified by:
getType in interface Verb

getExt

public Ext getExt()

setExt

public void setExt(Ext ext)

toString

public String toString()
Overrides:
toString in class Object

getAdvice

public Advice getAdvice()

setAdvice

public void setAdvice(Advice advice)

hasValidAdvice

public boolean hasValidAdvice()
Since advice is optional, null advice is valid.


setId

public void setId(String id)

getId

public String getId()

setData

public void setData(Data data)

getData

public Data getData()

getDataId

public String getDataId()

setDataId

public void setDataId(String dataId)

isFirst

public boolean isFirst()

setFirst

public void setFirst(boolean first)

isFollow

public boolean isFollow()

setFollow

public void setFollow(boolean follow)

isLast

public boolean isLast()

setLast

public void setLast(boolean last)

isValid

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

Specified by:
isValid in interface Verb

getJSONPrefix

protected String getJSONPrefix()

getJSONPostfix

protected String getJSONPostfix()

getClientId

public String getClientId()

setClientId

public void setClientId(String clientId)

getMetaChannel

public String getMetaChannel()
To be overriden by subclass used in isValid().



Copyright © 2012 Oracle Corporation. All Rights Reserved.