|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.grizzly.container.AsyncConnectionImpl
public class AsyncConnectionImpl
This class represent a possible asynchronous connection. An asynchronous connection can always be suspended or resumed, its associated request and response objects be used to construct a response, etc. This class hook the Grizzlet with the underlying CometHandler.
| Field Summary | |
|---|---|
String |
message
|
| Constructor Summary | |
|---|---|
AsyncConnectionImpl()
|
|
| Method Summary | |
|---|---|
String |
getPushEvent()
Return the message that can be pushed back. |
GrizzletRequest |
getRequest()
Return the GrizzletRequest associated with this AsynchConnection. |
GrizzletResponse |
getResponse()
Return the GrizzletResponse associated with this AsynchConnection. |
boolean |
hasPushEvent()
Is this AsyncConnection has push events ready to push back data to its associated client. |
boolean |
isGet()
Is the current asynchronous connection defined as an HTTP Get. |
boolean |
isPost()
Is the current asynchronous connection defined as an HTTP Get. |
boolean |
isResuming()
Is this AsyncConnection being in the process of being resumed? |
boolean |
isSuspended()
Return true is the current connection associated with this event has been suspended. |
void |
push(String message)
Advises the Grizzlet Container to start intiating a push operation, using the argument message. |
void |
recycle()
|
void |
resume()
Resume a suspended connection. |
void |
setCometContext(CometContext cometContext)
|
void |
setGrizzlet(Grizzlet grizzlet)
|
void |
sethasPushEvent(boolean hasPushEvent)
|
void |
setIsResuming(boolean isResuming)
|
protected void |
setRequest(GrizzletRequest cometRequest)
|
protected void |
setResponse(GrizzletResponse cometResponse)
|
void |
suspend()
Suspend the current connection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public String message
| Constructor Detail |
|---|
public AsyncConnectionImpl()
| Method Detail |
|---|
public void setCometContext(CometContext cometContext)
public GrizzletRequest getRequest()
AsyncConnection
getRequest in interface AsyncConnectionprotected void setRequest(GrizzletRequest cometRequest)
public GrizzletResponse getResponse()
AsyncConnection
getResponse in interface AsyncConnectionprotected void setResponse(GrizzletResponse cometResponse)
public boolean isSuspended()
AsyncConnection
isSuspended in interface AsyncConnection
public void suspend()
throws AlreadyPausedException
AsyncConnection
suspend in interface AsyncConnectionAlreadyPausedException
public void resume()
throws NotYetPausedException
AsyncConnection
resume in interface AsyncConnectionNotYetPausedExceptionpublic boolean isResuming()
AsyncConnection
isResuming in interface AsyncConnectionpublic void setIsResuming(boolean isResuming)
public void push(String message)
throws IOException
AsyncConnectionmessage. All asynchronous connection that has
been suspended will have a chance to push the data back to their
associated clients.
push in interface AsyncConnectionmessage - The data that will be pushed.
IOExceptionpublic void sethasPushEvent(boolean hasPushEvent)
public boolean hasPushEvent()
AsyncConnection
hasPushEvent in interface AsyncConnectionpublic String getPushEvent()
AsyncConnectionmessage that can be pushed back.
getPushEvent in interface AsyncConnectionpublic boolean isGet()
AsyncConnection
isGet in interface AsyncConnectionpublic boolean isPost()
AsyncConnection
isPost in interface AsyncConnectionpublic void setGrizzlet(Grizzlet grizzlet)
public void recycle()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||