com.nexaweb.server.pushconnection
Interface PushConnection

All Known Subinterfaces:
Flushable

public interface PushConnection

This represents a physical persistent connection between the client and server. PushConnections provide realtime communication from the server to the client.

Since all inbound connections from clients are managed by the application server, when PushConnections are established, a thread is allocated from the application server's thread pool to handle the request. During the course of a normal request / response cycle, these threads are returned to the pool quickly. However, when the connection remains open, (as is the case with a request establishing a PushConnection), the thread may not be returned and is in use for the life of the connection.

Therefore:

You can retreive this object for a particular session by using PushConnectionManager.

In certain scenarios, PushConnections may need to be flushed using a FlushPolicy.

Statistics about the data flowing over a PushConnection may be obtained from the ConnectionStatistics object on each connection.

See Also:
PushConnectionManager

Method Summary
 void close()
          Closes this PushConnection.
 ConnectionStatistics getConnectionStatistics()
          Gets the ConnectionStatistics for this PushConnection.
 FlushPolicy getFlushPolicy()
          Gets the FlushPolicy for this PushConnection.
 ServerSession getServerSession()
          Returns the ServerSession with which this PushConnection object is associated.
 boolean isOpen()
          Returns true if the PushConnection is currently open.
 void setFlushPolicy(FlushPolicy policy)
          Sets the FlushPolicy for this PushConnection.
 

Method Detail

getServerSession

public ServerSession getServerSession()
Returns the ServerSession with which this PushConnection object is associated.

Returns:
The ServerSession with which this PushConnection object is associated.

close

public void close()
Closes this PushConnection. The PushConnection will not be re-established unless there is an explicit call to PushConnectionManager.establishPushConnection(com.nexaweb.server.session.ServerSession).


isOpen

public boolean isOpen()
Returns true if the PushConnection is currently open.

Returns:
true if the PushConnection is currently open.

setFlushPolicy

public void setFlushPolicy(FlushPolicy policy)
Sets the FlushPolicy for this PushConnection.

Parameters:
policy - The policy that will manage flushing this connection.

getFlushPolicy

public FlushPolicy getFlushPolicy()
Gets the FlushPolicy for this PushConnection.

Returns:
The policy that will manage flushing this connection.

getConnectionStatistics

public ConnectionStatistics getConnectionStatistics()
Gets the ConnectionStatistics for this PushConnection.

Returns:
The ConnectionStatistics object keeping statistics for the PushConnection.


Copyright © 2005 Nexaweb Technologies, Inc. All Rights Reserved.