void setDevice(Device device) { if (device != null && this.device != null) throw new IllegalStateException( "already owned by Device: " + device.getDeviceName()); this.device = device; }
private String getFullApplicationName(DeviceExtension ext) { try { Method m = ext.getClass().getMethod("getApplicationName", (Class<?>[])null); String appName = (String) m.invoke(ext, (Object[])null); return appName + "@" + device.getDeviceName(); } catch (Exception e) { return device.getDeviceName(); } }
void setDevice(Device device) { if (device != null) { if (this.device != null) throw new IllegalStateException("already owned by " + this.device.getDeviceName()); for (Connection conn : conns) if (conn.getDevice() != device) throw new IllegalStateException(conn + " not owned by " + device.getDeviceName()); } this.device = device; }
void setDevice(Device device) { if (device != null) { if (this.device != null) throw new IllegalStateException("already owned by " + this.device.getDeviceName()); for (Connection conn : conns) if (conn.getDevice() != device) throw new IllegalStateException(conn + " not owned by " + device.getDeviceName()); } this.device = device; }
void setDevice(Device device) { if (device != null) { if (this.device != null) throw new IllegalStateException("already owned by " + this.device.getDeviceName()); for (Connection conn : conns) if (conn.getDevice() != device) throw new IllegalStateException(conn + " not owned by " + device.getDeviceName()); } this.device = device; }
public void setAuditRecordRepositoryDevice(Device arrDevice) { SafeClose.close(activeConnection); activeConnection = null; this.arrDevice = arrDevice; this.arrDeviceName = arrDevice != null ? arrDevice.getDeviceName() : null; }
@GET @Path("reload/repo") public Response reloadRepository() throws Exception { service.reload(); log.info("Service reconfigured (device {})",service.getDevice().getDeviceName()); return Response.status(Status.OK).build(); }
@Override public void stop() { log.info("Stopping XDS extension {} @ {}", xdsServiceType, device.getDeviceName()); running = false; if (hl7serviceAvail) { log.info("Stopping HL7 XDS services..."); device.unbindConnections(); log.info("HL7 XDS services stopped"); } logApplicationActivity(false); }
@Override public void start() throws Exception { log.info("Starting XDS extension {} @ {}", xdsServiceType, device.getDeviceName()); running = true; if (hl7serviceAvail) { log.info("Starting HL7 XDS services..."); device.bindConnections(); log.info("HL7 XDS services started"); } logApplicationActivity(true); }
public void addConnection(Connection conn) { if (conn.getProtocol() != Connection.Protocol.DICOM) throw new IllegalArgumentException( "protocol != DICOM - " + conn.getProtocol()); if (device != null && device != conn.getDevice()) throw new IllegalStateException(conn + " not contained by Device: " + device.getDeviceName()); conns.add(conn); }
public void addConnection(Connection conn) { if (conn.getProtocol() != Connection.Protocol.HTTP) throw new IllegalArgumentException( "Web Application does not support protocol " + conn.getProtocol()); if (device != null && device != conn.getDevice()) throw new IllegalStateException(conn + " not contained by " + device.getDeviceName()); conns.add(conn); }
public void addConnection(Connection conn) { if (conn.getProtocol() != Connection.Protocol.HTTP) throw new IllegalArgumentException( "Web Application does not support protocol " + conn.getProtocol()); if (device != null && device != conn.getDevice()) throw new IllegalStateException(conn + " not contained by " + device.getDeviceName()); conns.add(conn); }
@Override public void persist(Device device) throws ConfigurationException { if (readOnlyDevices.containsKey(device)) handleReadOnlyDeviceModification(); if (device.getDeviceName() == null) throw new ConfigurationException("The name of the device must not be null"); if (lowLevelConfig.nodeExists(DicomPath.devicePath(device.getDeviceName()))) throw new ConfigurationAlreadyExistsException("Device " + device.getDeviceName() + " already exists"); // otherwise it is the same as merge merge(device); }
public void addConnection(Connection conn) { if (!conn.getProtocol().isSyslog()) throw new IllegalArgumentException( "Audit Logger does not support protocol " + conn.getProtocol()); if (device != null && device != conn.getDevice()) throw new IllegalStateException(conn + " not contained by " + device.getDeviceName()); conns.add(conn); }
public void addConnection(Connection conn) { if (!conn.getProtocol().isSyslog()) throw new IllegalArgumentException( "Audit Logger does not support protocol " + conn.getProtocol()); if (device != null && device != conn.getDevice()) throw new IllegalStateException(conn + " not contained by " + device.getDeviceName()); conns.add(conn); }
@Override public void merge(Device device) throws ConfigurationException { if (readOnlyDevices.containsKey(device)) handleReadOnlyDeviceModification(); if (device.getDeviceName() == null) throw new ConfigurationException("The name of the device must not be null"); Map<String, Object> configNode = createDeviceConfigNode(device); lowLevelConfig.persistNode(DicomPath.devicePath(device.getDeviceName()), configNode, Device.class); }
@Override public void reload() throws Exception { log.info("Reloading XDS extension {} @ {}", xdsServiceType, device.getDeviceName()); device.reconfigure(findDevice()); if (hl7serviceAvail) { device.rebindConnections(); } reconfigureEvent.fire(new ReconfigureEvent()); }
private Executor getExecutor() { if (executor == null) { executor = getCamelContext().getExecutorServiceManager() .newDefaultThreadPool(this, device.getDeviceName()); } return executor; }
private ScheduledExecutorService getScheduledExecutor() { if (scheduledExecutor == null) { scheduledExecutor = getCamelContext().getExecutorServiceManager() .newDefaultScheduledThreadPool(this, device.getDeviceName()); } return scheduledExecutor; }
public void removeNetworkAE() throws ConfigurationException { ApplicationEntity ae = conf.findApplicationEntity(aeTitle); Device device = ae.getDevice(); device.removeApplicationEntity(aeTitle); for (Connection conn : ae.getConnections()) { device.removeConnection(conn); } if (device.getApplicationAETitles().isEmpty()) conf.removeDevice(device.getDeviceName(), EnumSet.of(DicomConfiguration.Option.REGISTER)); else conf.merge(device, EnumSet.of(DicomConfiguration.Option.REGISTER)); }