public final class AcseAssociation
extends java.lang.Object
Modifier and Type | Method | Description |
---|---|---|
void |
accept(java.nio.ByteBuffer payload) |
A server that got an Association Request Indication may use this function to accept the
association.
|
void |
close() |
Closes the connection simply by closing the socket.
|
void |
disconnect() |
Disconnects by sending a disconnect request at the Transport Layer and then closing the socket.
|
java.nio.ByteBuffer |
getAssociateResponseAPdu() |
|
int |
getMessageTimeout() |
|
static java.lang.String |
getSPDUTypeString(byte spduType) |
|
byte[] |
receive(java.nio.ByteBuffer pduBuffer) |
Listens for a new PDU and writes it into the given buffer.
|
void |
send(java.nio.ByteBuffer payload) |
|
void |
setMessageTimeout(int i) |
public static java.lang.String getSPDUTypeString(byte spduType)
public void accept(java.nio.ByteBuffer payload) throws java.io.IOException
payload
- the payload to send with the accept messagejava.io.IOException
- if an error occures accepting the associationpublic java.nio.ByteBuffer getAssociateResponseAPdu()
public void send(java.nio.ByteBuffer payload) throws java.io.IOException
java.io.IOException
public byte[] receive(java.nio.ByteBuffer pduBuffer) throws DecodingException, java.io.IOException, java.util.concurrent.TimeoutException
pduBuffer
- buffer to write the received pdu intoDecodingException
- if a decoding error occursjava.io.IOException
- if a non recoverable error occurs. Afterwards the association should be
closed by the userjava.util.concurrent.TimeoutException
- if a timeout occurspublic void disconnect()
public void close()
public int getMessageTimeout()
public void setMessageTimeout(int i)