public class SFCMConnection extends TCPConnection implements NegotiatedConnection
TCPConnection used for transfering files using
Stringflow Content Model. The implementation preserves all the sementics of a
TCPConnection; additionally it has a state flag to indicate if
the connection is ready for file transfer in either direction.
Stringflow Content Model (SFCM) mandates that once there is physical connection established with server, server assigns a SID to the connection and this SID must be communicated to server on an authenticated stream.
isConnected| Constructor and Description |
|---|
SFCMConnection(ConnectionConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearNegotiatedStatus()
Clear the negotiated status of this connection; meaning the negotiated
status will be changed to false.
|
void |
clearSid()
Clear sid for this connection,
|
void |
close()
It close the physical connection.
|
String |
getSid()
Returns negotiated connection sid, if connection is not negotiated then
it sid will be null.
|
boolean |
isNegotiated()
Connection implementation with protocol semantics, generally,
involves negotiating a packet stream; for example XMPP connections
requires XMPP stream to be negotiated before user packets can be
sent/received on the connection. |
boolean |
isReady()
Checks that connection is ready for file transmission.
|
void |
negotiationComplete()
Set the negotiated status for this connection
|
void |
setSid(String sid)
After negotiation completion successfully, update this sid with server
assigned connection id.
|
connect, getConnConfig, getId, getLastActivity, isConnected, read, write, writeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconnect, getId, getLastActivity, isConnected, read, write, writepublic SFCMConnection(ConnectionConfig config)
public boolean isNegotiated()
NegotiatedConnectionConnection implementation with protocol semantics, generally,
involves negotiating a packet stream; for example XMPP connections
requires XMPP stream to be negotiated before user packets can be
sent/received on the connection.isNegotiated in interface NegotiatedConnectionpublic void negotiationComplete()
negotiationComplete in interface NegotiatedConnectionpublic void clearNegotiatedStatus()
public void clearSid()
public String getSid()
public void setSid(String sid)
sid - sidpublic boolean isReady()
public void close()
throws IOException
close in interface Connectionclose in interface AutoCloseableclose in class TCPConnectionIOException - IOExceptionCopyright © 2019. All rights reserved.