我对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();
}现在我想要捕获接收消息以便进一步处理...我该怎么做呢?
发布于 2013-12-02 12:14:55
仔细看看HAPI提供的示例
ReceivingApplication handler = new ExampleReceiverApplication(); 这个类可以处理传入的消息
https://stackoverflow.com/questions/19837674
复制相似问题