public final class MllpUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
closeConnection(Socket socket) |
static byte[] |
closeFrame(Socket socket)
Close a MLLP frame by reading from the socket until the end of the frame is found.
|
static void |
openFrame(Socket socket)
Open the MLLP frame by reading from the Socket until the begging of the frame is found.
|
static void |
resetConnection(Socket socket) |
static void |
writeFramedPayload(Socket socket,
byte[] payload)
Write a MLLP-Framed payload to the Socket
|
public static void openFrame(Socket socket) throws SocketTimeoutException, MllpCorruptFrameException, MllpException
socket - the Socket to readSocketTimeoutException - thrown if a timeout occurs while looking for the beginning of the MLLP frame, but
nothing is yet available - this is NOT an error conditionMllpCorruptFrameException - if the MLLP Frame is corrupted in some wayMllpException - for other unexpected error conditionspublic static byte[] closeFrame(Socket socket) throws MllpTimeoutException, MllpCorruptFrameException, MllpException
socket - the Socket to be readMllpTimeoutException - thrown if a timeout occurs while closing the MLLP frameMllpCorruptFrameException - if the MLLP Frame is corrupted in some wayMllpException - for other unexpected error conditionspublic static void writeFramedPayload(Socket socket, byte[] payload) throws MllpException
socket - the Socket to write the payloadpayload - the MLLP payloadMllpWriteException - if the write failsMllpException - for other unexpected error conditionspublic static void closeConnection(Socket socket)
public static void resetConnection(Socket socket)
Apache Camel