public class ConnectionCometController extends java.lang.Object implements CometController, SocketLinkCometListener
Constructor and Description |
---|
ConnectionCometController(SocketLink conn,
boolean isTop,
ServletRequest request,
ServletResponse response) |
Modifier and Type | Method and Description |
---|---|
void |
addAsyncListener(AsyncListener listener,
ServletRequest request,
ServletResponse response) |
void |
addListener(AsyncListener listener) |
void |
addListener(AsyncListener listener,
ServletRequest request,
ServletResponse response) |
void |
close()
Closes the connection.
|
void |
closeImpl() |
void |
complete()
Complete the connection
|
<T extends AsyncListener> |
createListener(java.lang.Class<T> cl) |
void |
dispatch() |
void |
dispatch(ServletContext context,
java.lang.String path) |
void |
dispatch(java.lang.String path) |
java.lang.Object |
getAttribute(java.lang.String name)
Gets a request attribute.
|
java.lang.String |
getForwardPath() |
long |
getMaxIdleTime()
Gets the max idle time.
|
ServletRequest |
getRequest() |
ServletResponse |
getResponse() |
long |
getTimeout() |
boolean |
hasOriginalRequestAndResponse() |
boolean |
isActive()
Returns true if the connection is active.
|
boolean |
isClosed()
Returns true if the connection is active.
|
boolean |
isComet()
Returns true for an active comet connection.
|
boolean |
isComplete()
Returns true if the connection is complete.
|
boolean |
isDuplex()
Returns true for a duplex controller
|
boolean |
isTimeout()
Return true if timed out
|
void |
onComplete()
Called when the connection closes
|
boolean |
onTimeout()
Called when the connection times out
|
void |
removeAttribute(java.lang.String name)
Remove a request attribute.
|
void |
setAsyncListenerNode(AsyncListenerNode node)
Sets the async listener
|
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Sets a request attribute.
|
void |
setMaxIdleTime(long idleTime)
Sets the max idle time.
|
void |
setTimeout(long timeout) |
void |
start(java.lang.Runnable task) |
void |
startResume()
Suspend the connection on the next request
|
void |
timeout()
Sets the timeout.
|
java.lang.String |
toString() |
boolean |
wake()
Wakes the connection.
|
public ConnectionCometController(SocketLink conn, boolean isTop, ServletRequest request, ServletResponse response)
public void setMaxIdleTime(long idleTime)
setMaxIdleTime
in interface CometController
public long getMaxIdleTime()
getMaxIdleTime
in interface CometController
public final boolean isComplete()
public final void complete()
public boolean onTimeout()
SocketLinkCometListener
onTimeout
in interface SocketLinkCometListener
public void onComplete()
SocketLinkCometListener
onComplete
in interface SocketLinkCometListener
public final void startResume()
public final boolean wake()
wake
in interface CometController
public boolean isDuplex()
public final void timeout()
public final boolean isTimeout()
public final boolean isActive()
public boolean isComet()
public void setAsyncListenerNode(AsyncListenerNode node)
public void addAsyncListener(AsyncListener listener, ServletRequest request, ServletResponse response)
public void addListener(AsyncListener listener)
public void addListener(AsyncListener listener, ServletRequest request, ServletResponse response)
public <T extends AsyncListener> T createListener(java.lang.Class<T> cl) throws ServletException
ServletException
public void setTimeout(long timeout)
public long getTimeout()
public java.lang.Object getAttribute(java.lang.String name)
getAttribute
in interface CometController
public void setAttribute(java.lang.String name, java.lang.Object value)
setAttribute
in interface CometController
public void removeAttribute(java.lang.String name)
removeAttribute
in interface CometController
public final boolean isClosed()
isClosed
in interface CometController
public ServletRequest getRequest()
public ServletResponse getResponse()
public boolean hasOriginalRequestAndResponse()
public java.lang.String getForwardPath()
public void dispatch()
public void dispatch(java.lang.String path)
public void dispatch(ServletContext context, java.lang.String path)
public void start(java.lang.Runnable task)
public void close()
close
in interface CometController
public void closeImpl()
public java.lang.String toString()
toString
in class java.lang.Object