public class MllpClientResource
extends org.junit.rules.ExternalResource
| Modifier and Type | Class and Description |
|---|---|
static class |
MllpClientResource.DisconnectMethod |
| Constructor and Description |
|---|
MllpClientResource()
Use this constructor to avoid having the connection started by JUnit (since the port is still -1)
|
MllpClientResource(int port) |
MllpClientResource(String host,
int port) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
after() |
protected void |
before() |
void |
close() |
void |
connect() |
void |
connect(int connectTimeout) |
void |
disconnect() |
String |
eatData() |
String |
eatData(int timeout) |
int |
getConnectTimeout() |
MllpClientResource.DisconnectMethod |
getDisconnectMethod() |
String |
getMllpHost() |
int |
getMllpPort() |
int |
getSoTimeout() |
boolean |
isConnected() |
boolean |
isReuseAddress() |
boolean |
isSendEndOfBlock() |
boolean |
isSendEndOfData() |
boolean |
isSendStartOfBlock() |
boolean |
isTcpNoDelay() |
String |
receiveData() |
String |
receiveData(int timeout) |
String |
receiveFramedData() |
String |
receiveFramedData(int timout) |
void |
reset() |
void |
sendData(String data) |
void |
sendData(String data,
boolean disconnectAfterSend) |
void |
sendFramedData(String hl7Message) |
void |
sendFramedData(String hl7Message,
boolean disconnectAfterSend) |
void |
sendFramedDataInMultiplePackets(String hl7Message,
byte flushByte) |
void |
sendFramedDataInMultiplePackets(String hl7Message,
byte flushByte,
boolean disconnectAfterSend) |
String |
sendMessageAndWaitForAcknowledgement(String hl7Data) |
String |
sendMessageAndWaitForAcknowledgement(String hl7Data,
int acknwoledgementTimeout) |
void |
setConnectTimeout(int connectTimeout) |
void |
setDisconnectMethod(MllpClientResource.DisconnectMethod disconnectMethod) |
void |
setMllpHost(String mllpHost) |
void |
setMllpPort(int mllpPort) |
void |
setReuseAddress(boolean reuseAddress) |
void |
setSendEndOfBlock(boolean sendEndOfBlock) |
void |
setSendEndOfData(boolean sendEndOfData) |
void |
setSendStartOfBlock(boolean sendStartOfBlock) |
void |
setSoTimeout(int soTimeout) |
void |
setTcpNoDelay(boolean tcpNoDelay) |
public MllpClientResource()
public MllpClientResource(int port)
public MllpClientResource(String host, int port)
protected void before()
throws Throwable
before in class org.junit.rules.ExternalResourceThrowableprotected void after()
after in class org.junit.rules.ExternalResourcepublic void close()
public void connect()
public void connect(int connectTimeout)
public void reset()
public void disconnect()
public MllpClientResource.DisconnectMethod getDisconnectMethod()
public boolean isConnected()
public void sendData(String data)
public void sendData(String data, boolean disconnectAfterSend)
public void sendFramedData(String hl7Message)
public void sendFramedData(String hl7Message, boolean disconnectAfterSend)
public void sendFramedDataInMultiplePackets(String hl7Message, byte flushByte)
public void sendFramedDataInMultiplePackets(String hl7Message, byte flushByte, boolean disconnectAfterSend)
public String receiveFramedData() throws SocketException, SocketTimeoutException
public String receiveFramedData(int timout) throws SocketException, SocketTimeoutException
public String receiveData() throws SocketException, SocketTimeoutException
public String receiveData(int timeout) throws SocketException, SocketTimeoutException
public String eatData() throws SocketException, SocketTimeoutException
public String eatData(int timeout) throws SocketException
SocketExceptionpublic String sendMessageAndWaitForAcknowledgement(String hl7Data) throws SocketException, SocketTimeoutException
public String sendMessageAndWaitForAcknowledgement(String hl7Data, int acknwoledgementTimeout) throws SocketException, SocketTimeoutException
public String getMllpHost()
public void setMllpHost(String mllpHost)
public int getMllpPort()
public void setMllpPort(int mllpPort)
public boolean isSendStartOfBlock()
public void setSendStartOfBlock(boolean sendStartOfBlock)
public boolean isSendEndOfBlock()
public void setSendEndOfBlock(boolean sendEndOfBlock)
public boolean isSendEndOfData()
public void setSendEndOfData(boolean sendEndOfData)
public int getConnectTimeout()
public void setConnectTimeout(int connectTimeout)
public int getSoTimeout()
public void setSoTimeout(int soTimeout)
public boolean isReuseAddress()
public void setReuseAddress(boolean reuseAddress)
public boolean isTcpNoDelay()
public void setTcpNoDelay(boolean tcpNoDelay)
public void setDisconnectMethod(MllpClientResource.DisconnectMethod disconnectMethod)
Copyright © 2017. All rights reserved.