I'm really new on Hapi HL7 an used the example Server Class.
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();
}
Now I want to catch the receiving message for further handle... How can I do this?
Take a close look at the example provided by HAPI
ReceivingApplication handler = new ExampleReceiverApplication();
This class can handle the incoming message
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.