public Connection attach(String host, int outboundPort, int inboundPort,
Parser parser, Class<? extends LowerLayerProtocol> llpClass,
boolean tls) throws HL7Exception {
try {
LowerLayerProtocol llp = llpClass.newInstance();
return attach(host, outboundPort, inboundPort, parser, llp, tls);
} catch (InstantiationException e) {
throw new HL7Exception("Cannot open connection to " + host + ":"
+ outboundPort, e);
} catch (IllegalAccessException e) {