Interface IConnection
public interface IConnection
- Since:
- Mar 5, 2006
-
Method Summary
Modifier and TypeMethodDescriptionvoidStart a transaction on this connectionvoiddispose()Dispose the connection.voidEnd a transaction on this connectionvoidInvalidate the connection.booleanisValid()read(int timeout) Reads an NCType message object from this connection.voidwrite(INCExternalizable message, int timeout) Serializes an NCType over this connection.
-
Method Details
-
beginTransaction
void beginTransaction()Start a transaction on this connection -
read
Reads an NCType message object from this connection.- Parameters:
timeout- - timeout in milliseconds- Returns:
- the read NCType object
- Throws:
NativeCommException- on error
-
write
Serializes an NCType over this connection.- Parameters:
message- - externalizable message object to sendtimeout- - timeout in milliseconds- Throws:
NativeCommException- on error
-
endTransaction
void endTransaction()End a transaction on this connection -
isValid
boolean isValid()- Returns:
- true if this instance is ready to execute further requests
-
handshake
NCMap handshake()- Returns:
- the handshake dictionary
-
dispose
void dispose()Dispose the connection. -
invalidate
void invalidate()Invalidate the connection. Marks the connection for future disposal, but does not cancel currently running requests.
-