org.apache.tomcat.bayeux.request
Class MetaDisconnectRequest

java.lang.Object
  extended by org.apache.tomcat.bayeux.RequestBase
      extended by org.apache.tomcat.bayeux.request.MetaDisconnectRequest
All Implemented Interfaces:
BayeuxRequest

public class MetaDisconnectRequest
extends RequestBase
implements BayeuxRequest

Handshake request Bayeux message.

Version:
1.0
Author:
Guy A. Molinari, Filip Hanik

Field Summary
protected static java.util.HashMap<java.lang.String,java.lang.Object> responseTemplate
           
 
Fields inherited from class org.apache.tomcat.bayeux.RequestBase
channel, clientId, conType, data, desiredConnTypeFlag, event, ext, id, minVersion, reconnectInterval, response, subscription, suppConnTypes, suppConnTypesFlag, timestampFmt, tomcatBayeux, version
 
Fields inherited from interface org.apache.tomcat.bayeux.BayeuxRequest
CURRENT_REQ_ATTR, JSON_MSG_ARRAY, LAST_REQ_ATTR
 
Constructor Summary
MetaDisconnectRequest(TomcatBayeux tb, org.jboss.servlet.http.HttpEvent event, JSONObject jsReq)
           
 
Method Summary
 int process(int prevops)
          Disconnect a client session.
 HttpError validate()
          Check client request for validity.
 
Methods inherited from class org.apache.tomcat.bayeux.RequestBase
addToDeliveryQueue, deliver, flushMessages, getChannel, getClientId, getEvent, getExt, getId, getJSONArray, getJSONArray, getReconnectInterval, getTimeStamp, getTomcatBayeux
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

responseTemplate

protected static java.util.HashMap<java.lang.String,java.lang.Object> responseTemplate
Constructor Detail

MetaDisconnectRequest

public MetaDisconnectRequest(TomcatBayeux tb,
                             org.jboss.servlet.http.HttpEvent event,
                             JSONObject jsReq)
                      throws JSONException
Throws:
JSONException
Method Detail

validate

public HttpError validate()
Check client request for validity. Per section 4.4.1 of the Bayuex spec a connect request must contain: 1) The "/meta/disconnect" channel identifier. 2) The clientId.

Specified by:
validate in interface BayeuxRequest
Overrides:
validate in class RequestBase
Returns:
HttpError This method returns null if no errors were found

process

public int process(int prevops)
            throws BayeuxException
Disconnect a client session.

Specified by:
process in interface BayeuxRequest
Overrides:
process in class RequestBase
Parameters:
prevops - - the operation requested by the previous request, in case of chained requests.
Returns:
int - returns the interest operation for a CometEvent. Currently not used
Throws:
BayeuxException - - if an error was detected, and the appropriate error response couldn't be delivered to the client.


Copyright © 2000-2009 Apache Software Foundation. All Rights Reserved.