Java 如何使用HAPI服务器捕获传入消息
我对Hapi HL7非常陌生,并使用了示例服务器类Java 如何使用HAPI服务器捕获传入消息,java,hapi,Java,Hapi,我对Hapi HL7非常陌生,并使用了示例服务器类 public static void main(String[] args) throws Exception { HapiContext context = new DefaultHapiContext(); MinLowerLayerProtocol mllp = new MinLowerLayerProtocol(); mllp.setCharset("UTF-8"); context.setLowerLa
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();
}
现在我想捕捉接收到的消息以便进一步处理。。。
我怎样才能做到这一点呢?仔细看看HAPI提供的示例
ReceivingApplication handler = new ExampleReceiverApplication();
这个类可以处理传入的消息嗨,danke für deine Antwort。我是mittlerweile selbst die Lösung gefunden。我已经收到了一份完整的申请。registerApplication(“ADT”、“A01”、新的MyHandler());我的主人是贝斯皮尔汉德勒(Expample')的主人,我的父亲是一位伟大的女主人。丹克