我真的是 Hapi HL7 的新手,我使用了示例服务器类。
public static void main(String[] args) throws Exception {
HapiContext context = new DefaultHapiContext();
MinLowerLayerProtocol mllp = new MinLowerLayerProtocol();
mllp.setCharset("UTF-8");
context.setLowerLayerProtocol(mllp);
int port = 2010; // The port to listen on
boolean useTls = false; // Should we use TLS/SSL?
HL7Service server = context.newServer(port, useTls);
ReceivingApplication handler = new ExampleReceiverApplication();
server.registerApplication("*", "*", handler);
server.registerConnectionListener(new MyConnectionListener());
server.setExceptionHandler(new MyExceptionHandler());
server.startAndWait();
}
现在我想捕获接收消息以进行进一步处理......我该怎么做?