use of org.dcm4che3.net.hl7.HL7DeviceExtension in project dcm4che by dcm4che.
the class JsonConfigurationTest method addHL7DeviceExtension.
private static void addHL7DeviceExtension(Device device) {
Connection hl7 = new Connection("hl7", "localhost", 2575);
hl7.setBindAddress("0.0.0.0");
hl7.setClientBindAddress("0.0.0.0");
hl7.setProtocol(Connection.Protocol.HL7);
device.addConnection(hl7);
HL7DeviceExtension ext = new HL7DeviceExtension();
device.addDeviceExtension(ext);
HL7Application hl7App = new HL7Application("*");
ext.addHL7Application(hl7App);
hl7App.addConnection(hl7);
hl7App.setHL7DefaultCharacterSet(HL7_DEFAULT_CHARACTER_SET);
hl7App.setAcceptedMessageTypes(HL7_MESSAGE_TYPES);
hl7App.setAcceptedSendingApplications(HL7_ACCEPTED_SENDING_APPLICATIONS);
}
use of org.dcm4che3.net.hl7.HL7DeviceExtension in project dcm4che by dcm4che.
the class LdapHL7Configuration method markForUnregister.
@Override
protected void markForUnregister(Device prev, Device device, List<String> dns) {
HL7DeviceExtension prevHL7Ext = prev.getDeviceExtension(HL7DeviceExtension.class);
if (prevHL7Ext == null)
return;
HL7DeviceExtension hl7Ext = device.getDeviceExtension(HL7DeviceExtension.class);
for (String name : prevHL7Ext.getHL7ApplicationNames()) {
if (!name.equals("*") && (hl7Ext == null || hl7Ext.getHL7Application(name) == null))
dns.add(hl7appDN(name, appNamesRegistryDN));
}
}
use of org.dcm4che3.net.hl7.HL7DeviceExtension in project dcm4che by dcm4che.
the class LdapHL7ConfigurationTest method createDevice.
private static Device createDevice(String name, String appName) throws Exception {
Device device = new Device(name);
HL7DeviceExtension hl7Ext = new HL7DeviceExtension();
device.addDeviceExtension(hl7Ext);
Connection conn = createConn("host.dcm4che.org", 2575);
device.addConnection(conn);
HL7Application app = createHL7App(appName, conn);
hl7Ext.addHL7Application(app);
return device;
}
use of org.dcm4che3.net.hl7.HL7DeviceExtension in project dcm4che by dcm4che.
the class JsonHL7Configuration method loadDeviceExtension.
@Override
public boolean loadDeviceExtension(Device device, JsonReader reader, ConfigurationDelegate config) throws ConfigurationException {
if (!reader.getString().equals("hl7Application"))
return false;
HL7DeviceExtension ext = new HL7DeviceExtension();
loadFrom(ext, reader, device, config);
device.addDeviceExtension(ext);
return true;
}
use of org.dcm4che3.net.hl7.HL7DeviceExtension in project dcm4chee-arc-light by dcm4che.
the class ArchiveDeviceFactory method createHL7Device.
public static Device createHL7Device(String name, String appName, String host, int port, int tlsPort) {
Device device = new Device(name);
HL7DeviceExtension hl7Device = new HL7DeviceExtension();
device.addDeviceExtension(hl7Device);
HL7Application hl7app = new HL7Application(appName);
hl7Device.addHL7Application(hl7app);
Connection hl7 = new Connection("hl7", host, port);
hl7.setProtocol(Connection.Protocol.HL7);
device.addConnection(hl7);
hl7app.addConnection(hl7);
Connection hl7TLS = new Connection("hl7-tls", host, tlsPort);
hl7TLS.setProtocol(Connection.Protocol.HL7);
hl7TLS.setTlsCipherSuites(Connection.TLS_RSA_WITH_AES_128_CBC_SHA, Connection.TLS_RSA_WITH_3DES_EDE_CBC_SHA);
device.addConnection(hl7TLS);
hl7app.addConnection(hl7TLS);
return device;
}
Aggregations