Interface IConnection
-
public interface IConnection- Since:
- Mar 5, 2006
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidbeginTransaction()Start a transaction on this connectionvoiddispose()Dispose the connection.voidendTransaction()End a transaction on this connectionNCMaphandshake()voidinvalidate()Invalidate the connection.booleanisValid()NCTyperead(int timeout)Reads an NCType message object from this connection.voidwrite(INCExternalizable message, int timeout)Serializes an NCType over this connection.
-
-
-
Method Detail
-
beginTransaction
void beginTransaction()
Start a transaction on this connection
-
read
NCType read(int timeout) throws NativeCommException
Reads an NCType message object from this connection.- Parameters:
timeout- - timeout in milliseconds- Returns:
- the read NCType object
- Throws:
NativeCommException- on error
-
write
void write(INCExternalizable message, int timeout) throws NativeCommException
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.
-
-