| java.lang.Object org.openlaszlo.connection.HTTPConnection
HTTPConnection | public class HTTPConnection (Code) | | Persistent connection for SWF files.
|
HTTPConnection | public HTTPConnection(HttpServletResponse res, String username, int swfversion) throws IOException(Code) | | Constructor.
Parameters: res - http servlet response to use as persistent connection Parameters: username - username associated with connection |
HTTPConnection | public HTTPConnection(HttpServletResponse res, HTTPConnection hc) throws IOException(Code) | | Will update the request count, heartbeat count, total number of bytes
sent.
Parameters: res - http servlet response to user as persistent connect Parameters: hc - HTTPConnection to copy parameters from |
connect | public void connect() throws IOException(Code) | | This call will block and wait for events to handle. Keeps HTTP
connection alive for an asynchronous event.
Parameters: res - servlet response object true if connection was lost to reconnection, else false |
disconnect | public void disconnect()(Code) | | Close connection.
|
disconnect | public synchronized void disconnect(boolean isReconnect)(Code) | | Close connection.
Parameters: isReconnect - if this connection will be replaced by anotherconnection. |
doPad | public boolean doPad()(Code) | | Check if padding is required.
|
getConnectionInfoXML | public static String getConnectionInfoXML(String type, String msg)(Code) | | XML message structure used to push server information to the
client. Used for heartbeats, sending connection startup and informing
users someone's been disconnected.
Parameters: type - type of information. This will be received by the client as adataset. Parameters: msg - message of type, if any an xml string with connection information |
getConnectionLength | public static int getConnectionLength()(Code) | | |
getHeartbeatInterval | public long getHeartbeatInterval()(Code) | | Get heartbeat interval in milliseconds.
|
getMaxMessageLen | public static int getMaxMessageLen()(Code) | | |
getReconnectionWaitInterval | public static int getReconnectionWaitInterval()(Code) | | |
getSWFVersion | public int getSWFVersion()(Code) | | version for SWF bytes. |
send | public synchronized void send(String msg) throws IOException(Code) | | Queue up event to send.
Parameters: msg - event message Parameters: doFlushQueue - if true, flushes the message event queue throws: IOException - if connection does not exist |
setDoPad | public HTTPConnection setDoPad(boolean doPad)(Code) | | Set if you want padding of bytes to headers. Used for browser like IE
that don't display anything until the Nth byte.
Parameters: doPad - flag for padding this object |
setHeartbeatInterval | public HTTPConnection setHeartbeatInterval(long heartbeatInterval)(Code) | | Set heartbeat in milliseconds.
|
toBeReconnected | public synchronized boolean toBeReconnected()(Code) | | Check if connection is to be replaced by another connection.
|
|
|