public final class MllpSocketUtil extends Object
Modifier and Type | Method and Description |
---|---|
static void |
close(Socket socket,
org.slf4j.Logger logger,
String reasonMessage) |
static int |
findEndOfMessage(byte[] payload) |
static int |
findEndOfMessage(byte[] payload,
int length)
Find the end of the HL7 Payload
|
static int |
findStartOfBlock(byte[] payload) |
static int |
findStartOfBlock(byte[] payload,
int length)
Find the beginning of the HL7 Payload
|
static String |
getAddressString(Socket socket) |
static void |
reset(Socket socket,
org.slf4j.Logger logger,
String reasonMessage) |
static void |
setSoTimeout(Socket socket,
int timeout,
org.slf4j.Logger logger,
String reasonMessage) |
public static void setSoTimeout(Socket socket, int timeout, org.slf4j.Logger logger, String reasonMessage)
public static int findStartOfBlock(byte[] payload)
public static int findStartOfBlock(byte[] payload, int length)
Searches the payload from the beginning, looking for the START_OF_BLOCK character.
payload
- the payload to checklength
- the current valid length of the receive bufferpublic static int findEndOfMessage(byte[] payload)
public static int findEndOfMessage(byte[] payload, int length)
Searches the payload from the end, looking for the [END_OF_BLOCK, END_OF_DATA] characters.
payload
- the payload to checklength
- the current valid length of the receive bufferApache Camel