org.dcm4che2.net
Class Device

java.lang.Object
  extended by org.dcm4che2.net.Device

public class Device
extends java.lang.Object

DICOM Part 15, Annex H compliant description of a DICOM enabled system or device. This is used to describe a DICOM-enabled network endpoint in terms of its physical attributes (serial number, manufacturer, etc.), its context (issuer of patient ids used by the device, etc.), as well as its capabilities (TLS-enabled, AE titles used, etc.).

Since:
Nov 25, 2005
Version:
$Revision: 6952 $ $Date: 2007-11-27 08:24:27 -0600 (Tue, 27 Nov 2007) $
Author:
gunter zeilinger(gunterze@gmail.com)

Constructor Summary
Device()
          Default constructor.
Device(java.lang.String deviceName)
          Constructor which sets the name of this device.
 
Method Summary
 int getAssociationReaperPeriod()
          The AssociationReaper will check for idle associations.
 java.security.cert.X509Certificate[] getAuthorizedNodeCertificate()
          Get the certificates of nodes that are authorized to connect to this device.
 java.lang.String getDescription()
          Get the description of this device.
 java.lang.String getDeviceName()
          Get the name of this device.
 java.lang.String getDeviceSerialNumber()
          Get the serial number belonging to this device.
 java.lang.String[] getInstitutionAddress()
          Set the address of the institution which operates this device.
 java.lang.String[] getInstitutionalDepartmentName()
          Get the department name associated with this device.
 java.lang.String[] getInstitutionName()
          Get the institution name associated with this device; may be the site where it resides or is operating on behalf of.
 java.lang.String getIssuerOfPATIENT_ID()
          Get the issuer of patient IDs for this device.
 java.lang.String getManufacturer()
          Get the manufacturer of this device.
 java.lang.String getManufacturerModelName()
          Get the manufacturer model name of this device.
 NetworkApplicationEntity[] getNetworkApplicationEntity()
          Get all of the NetworkApplicationEntity objects that this device is known by.
 NetworkApplicationEntity getNetworkApplicationEntity(java.lang.String aet)
          Get a specific NetworkApplicationEntity object by it's AE title.
 NetworkConnection[] getNetworkConnection()
          Get the NetworkConnection objects associated with this device.
 java.lang.String[] getPrimaryDeviceType()
          Get the type codes associated with this device.
 java.lang.Object[] getRelatedDeviceConfiguration()
          Get references to any related configuration and descriptive information.
 java.lang.String[] getSoftwareVersion()
          Get the software versions running on (or implemented by) this device.
 javax.net.ssl.SSLContext getSSLContext()
          Get the secure socket layer context set by setSSLContext(javax.net.ssl.SSLContext) or initialized by initTLS(java.security.KeyStore, char[]).
 java.lang.String getStationName()
          Get the station name belonging to this device.
 java.security.cert.X509Certificate[] getThisNodeCertificate()
          Get the public certificate for this device.
 java.lang.Object[] getVendorDeviceData()
          Get device specific vendor configuration information
 void initTLS(java.security.KeyStore key, char[] password)
          Initialize transport layer security (TLS) for network interactions using the device's certificate (as returned by getThisNodeCertificate()).
 void initTLS(java.security.KeyStore key, char[] password, java.security.KeyStore trust)
          Initialize transport layer security (TLS) for network interactions using the trusted material (certificates, etc.) contained in the "trust" parameter..
 boolean isInstalled()
          Get a boolean to indicate whether this device is presently installed on the network.
 void setAssociationReaperPeriod(int associationReaperPeriod)
          The AssociationReaper will check for idle associations.
 void setAuthorizedNodeCertificate(java.security.cert.X509Certificate[] certs)
          Set the certificates of nodes that are authorized to connect to this device.
 void setDescription(java.lang.String description)
          Set the description of this device.
 void setDeviceName(java.lang.String deviceName)
          Set the name of this device.
 void setDeviceSerialNumber(java.lang.String deviceSerialNumber)
          Set the serial number of this device.
 void setInstalled(boolean installed)
          Get a boolean to indicate whether this device is presently installed on the network.
 void setInstitutionAddress(java.lang.String[] addr)
          Get the address of the institution which operates this device.
 void setInstitutionalDepartmentName(java.lang.String[] name)
          Set the department name associated with this device.
 void setInstitutionName(java.lang.String[] name)
          Set the institution name associated with this device; may be the site where it resides or is operating on behalf of.
 void setIssuerOfPATIENT_ID(java.lang.String issuerOfPATIENT_ID)
          Set the issuer of patient IDs for this device.
 void setManufacturer(java.lang.String manufacturer)
          Set the manufacturer of this device.
 void setManufacturerModelName(java.lang.String manufacturerModelName)
          Set the manufacturer model name of this device.
 void setNetworkApplicationEntity(NetworkApplicationEntity networkAE)
          Set the NetworkApplicationEntity object that this device is known by.
 void setNetworkApplicationEntity(NetworkApplicationEntity[] networkAE)
          Set all of the NetworkApplicationEntity objects that this device is known by.
 void setNetworkConnection(NetworkConnection networkConnection)
          Set the NetworkConnection object associated with this device.
 void setNetworkConnection(NetworkConnection[] networkConnection)
          Get the NetworkConnection objects associated with this device.
 void setPrimaryDeviceType(java.lang.String[] primaryDeviceType)
          Set the type codes associated with this device.
 void setRelatedDeviceConfiguration(java.lang.Object[] relatedDevice)
          Set references to any related configuration and descriptive information.
 void setSoftwareVersion(java.lang.String[] softwareVersion)
          Set the software versions running on (or implemented by) this device.
 void setSSLContext(javax.net.ssl.SSLContext sslContext)
          Set the secure socket layer context associated with this device.
 void setStationName(java.lang.String stationName)
          Set the station name belonging to this device.
 void setThisNodeCertificate(java.security.cert.X509Certificate[] certs)
          Set the public certificates for this device.
 void setVendorDeviceData(java.lang.Object[] vendorDeviceData)
          Set device specific vendor configuration information
 void startListening(java.util.concurrent.Executor executor)
          Bind to a socket and start listening for DICOM associations.
 void stopListening()
          Unbind from all active socket connections.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Device

public Device()
Default constructor.


Device

public Device(java.lang.String deviceName)
Constructor which sets the name of this device.

Parameters:
deviceName - String
Method Detail

getDeviceName

public java.lang.String getDeviceName()
Get the name of this device.

Returns:
A String containing the device name.

setDeviceName

public void setDeviceName(java.lang.String deviceName)
Set the name of this device.

This should be a unique name for this device. It is restricted to legal LDAP names, and not constrained by DICOM AE Title limitations.

Parameters:
deviceName - A String containing the device name.

getDescription

public java.lang.String getDescription()
Get the description of this device.

Returns:
A String containing the device description.

setDescription

public void setDescription(java.lang.String description)
Set the description of this device.

Parameters:
description - A String containing the device description.

getManufacturer

public java.lang.String getManufacturer()
Get the manufacturer of this device.

Returns:
A String containing the device manufacturer.

setManufacturer

public void setManufacturer(java.lang.String manufacturer)
Set the manufacturer of this device.

This should be the same as the value of Manufacturer (0008,0070) in SOP instances created by this device.

Parameters:
manufacturer - A String containing the device manufacturer.

getManufacturerModelName

public java.lang.String getManufacturerModelName()
Get the manufacturer model name of this device.

Returns:
A String containing the device manufacturer model name.

setManufacturerModelName

public void setManufacturerModelName(java.lang.String manufacturerModelName)
Set the manufacturer model name of this device.

This should be the same as the value of Manufacturer Model Name (0008,1090) in SOP instances created by this device.

Parameters:
manufacturerModelName - A String containing the device manufacturer model name.

getSoftwareVersion

public java.lang.String[] getSoftwareVersion()
Get the software versions running on (or implemented by) this device.

Returns:
A String array containing the software versions.

setSoftwareVersion

public void setSoftwareVersion(java.lang.String[] softwareVersion)
Set the software versions running on (or implemented by) this device.

This should be the same as the values of Software Versions (0018,1020) in SOP instances created by this device.

Parameters:
softwareVersion - A String array containing the software versions.

getStationName

public java.lang.String getStationName()
Get the station name belonging to this device.

Returns:
A String containing the station name.

setStationName

public void setStationName(java.lang.String stationName)
Set the station name belonging to this device.

This should be the same as the value of Station Name (0008,1010) in SOP instances created by this device.

Parameters:
stationName - A String containing the station name.

getDeviceSerialNumber

public java.lang.String getDeviceSerialNumber()
Get the serial number belonging to this device.

Returns:
A String containing the serial number.

setDeviceSerialNumber

public void setDeviceSerialNumber(java.lang.String deviceSerialNumber)
Set the serial number of this device.

This should be the same as the value of Device Serial Number (0018,1000) in SOP instances created by this device.

Parameters:
deviceSerialNumber - A String containing the serial number.

getPrimaryDeviceType

public java.lang.String[] getPrimaryDeviceType()
Get the type codes associated with this device.

Returns:
A String array containing the type codes of this device.

setPrimaryDeviceType

public void setPrimaryDeviceType(java.lang.String[] primaryDeviceType)
Set the type codes associated with this device.

Represents the kind of device and is most applicable for acquisition modalities. Types should be selected from the list of code values (0008,0100) for Context ID 30 in PS3.16 when applicable.

Parameters:
primaryDeviceType -

getInstitutionName

public java.lang.String[] getInstitutionName()
Get the institution name associated with this device; may be the site where it resides or is operating on behalf of.

Returns:
A String array containing the institution name values.

setInstitutionName

public void setInstitutionName(java.lang.String[] name)
Set the institution name associated with this device; may be the site where it resides or is operating on behalf of.

Should be the same as the value of Institution Name (0008,0080) in SOP Instances created by this device.

Parameters:
names - A String array containing the institution name values.

getInstitutionAddress

public java.lang.String[] getInstitutionAddress()
Set the address of the institution which operates this device.

Returns:
A String array containing the institution address values.

setInstitutionAddress

public void setInstitutionAddress(java.lang.String[] addr)
Get the address of the institution which operates this device.

Should be the same as the value of Institution Address (0008,0081) attribute in SOP Instances created by this device.

Parameters:
addr - A String array containing the institution address values.

getInstitutionalDepartmentName

public java.lang.String[] getInstitutionalDepartmentName()
Get the department name associated with this device.

Returns:
A String array containing the dept. name values.

setInstitutionalDepartmentName

public void setInstitutionalDepartmentName(java.lang.String[] name)
Set the department name associated with this device.

Should be the same as the value of Institutional Department Name (0008,1040) in SOP Instances created by this device.

Parameters:
name - A String array containing the dept. name values.

getIssuerOfPATIENT_ID

public java.lang.String getIssuerOfPATIENT_ID()
Get the issuer of patient IDs for this device.

Returns:
A String containing the PID issuer value.

setIssuerOfPATIENT_ID

public void setIssuerOfPATIENT_ID(java.lang.String issuerOfPATIENT_ID)
Set the issuer of patient IDs for this device.

Default value for the Issuer of Patient ID (0010,0021) for SOP Instances created by this device. May be overridden by the values received in a worklist or other source.

Parameters:
issuerOfPATIENT_ID - A String containing the PID issuer value.

getRelatedDeviceConfiguration

public java.lang.Object[] getRelatedDeviceConfiguration()
Get references to any related configuration and descriptive information.

Returns:
An Object array of related references.

setRelatedDeviceConfiguration

public void setRelatedDeviceConfiguration(java.lang.Object[] relatedDevice)
Set references to any related configuration and descriptive information.

The DNs of related device descriptions outside the DICOM Configuration hierarchy. Can be used to link the DICOM Device object to additional LDAP objects instantiated from other schema and used for separate administrative purposes.

Parameters:
relatedDevice - An Object array of related references.

getAuthorizedNodeCertificate

public java.security.cert.X509Certificate[] getAuthorizedNodeCertificate()
Get the certificates of nodes that are authorized to connect to this device.

Returns:
An array containing the X509Certificate objects

setAuthorizedNodeCertificate

public void setAuthorizedNodeCertificate(java.security.cert.X509Certificate[] certs)
Set the certificates of nodes that are authorized to connect to this device.

Parameters:
certs - An array containing the X509Certificate objects.

getThisNodeCertificate

public java.security.cert.X509Certificate[] getThisNodeCertificate()
Get the public certificate for this device.

Returns:
An array containing the X509Certificate objects

setThisNodeCertificate

public void setThisNodeCertificate(java.security.cert.X509Certificate[] certs)
Set the public certificates for this device.

Parameters:
certs - An array containing the X509Certificate objects.

getVendorDeviceData

public java.lang.Object[] getVendorDeviceData()
Get device specific vendor configuration information

Returns:
An Object array of the device data.

setVendorDeviceData

public void setVendorDeviceData(java.lang.Object[] vendorDeviceData)
Set device specific vendor configuration information

Parameters:
vendorDeviceData - An Object array of the device data.

isInstalled

public boolean isInstalled()
Get a boolean to indicate whether this device is presently installed on the network. (This is useful for pre-configuration, mobile vans, and similar situations.)

Returns:
A boolean which will be true if this device is installed.

setInstalled

public void setInstalled(boolean installed)
Get a boolean to indicate whether this device is presently installed on the network. (This is useful for pre-configuration, mobile vans, and similar situations.)

Parameters:
installed - A boolean which will be true if this device is installed.

getNetworkApplicationEntity

public NetworkApplicationEntity[] getNetworkApplicationEntity()
Get all of the NetworkApplicationEntity objects that this device is known by. The entities define how the device's DICOM services are identified on the network, as well as the properties and capabilities of those services.

Returns:
An array of NetworkApplicationEntity objects.

setNetworkApplicationEntity

public void setNetworkApplicationEntity(NetworkApplicationEntity networkAE)
Set the NetworkApplicationEntity object that this device is known by. The entity defines how the device's DICOM services are identified on the network, as well as the properties and capabilities of those services.

Parameters:
networkAE - A NetworkApplicationEntity object.

setNetworkApplicationEntity

public void setNetworkApplicationEntity(NetworkApplicationEntity[] networkAE)
Set all of the NetworkApplicationEntity objects that this device is known by. The entities define how the device's DICOM services are identified on the network, as well as the properties and capabilities of those services.

Parameters:
networkAE - An array of NetworkApplicationEntity objects.

getNetworkConnection

public NetworkConnection[] getNetworkConnection()
Get the NetworkConnection objects associated with this device. These will coincide with the TCP ports used by the device.

Returns:
An array of NetworkConnection objects.

setNetworkConnection

public void setNetworkConnection(NetworkConnection networkConnection)
Set the NetworkConnection object associated with this device. This will coincide with the TCP port used by the device.

Parameters:
networkConnection - ANetworkConnection object.

setNetworkConnection

public void setNetworkConnection(NetworkConnection[] networkConnection)
Get the NetworkConnection objects associated with this device. These will coincide with the TCP ports used by the device.

Parameters:
An - array of NetworkConnection objects.

getAssociationReaperPeriod

public int getAssociationReaperPeriod()
The AssociationReaper will check for idle associations. This time period (in milliseconds) defines how often the reaper will check this device's associations for idleness.

Returns:
An int signifying association idle check period in milliseconds.

setAssociationReaperPeriod

public void setAssociationReaperPeriod(int associationReaperPeriod)
The AssociationReaper will check for idle associations. This time period (in milliseconds) defines how often the reaper will check this device's associations for idleness.

Parameters:
associationReaperPeriod - An int signifying association idle check period in milliseconds.

setSSLContext

public void setSSLContext(javax.net.ssl.SSLContext sslContext)
Set the secure socket layer context associated with this device. Alternatively you may initialize the secure socket layer context by initTLS(java.security.KeyStore, char[]).

Parameters:
sslContext - initialized SSLContext

getSSLContext

public javax.net.ssl.SSLContext getSSLContext()
Get the secure socket layer context set by setSSLContext(javax.net.ssl.SSLContext) or initialized by initTLS(java.security.KeyStore, char[]).

Returns:
The initialized SSLContext.

initTLS

public void initTLS(java.security.KeyStore key,
                    char[] password)
             throws java.security.GeneralSecurityException
Initialize transport layer security (TLS) for network interactions using the device's certificate (as returned by getThisNodeCertificate()).

Parameters:
key - The KeyStore containing the keys needed for secure network interaction with another device.
password - A char array containing the password used to access the key.
Throws:
java.security.GeneralSecurityException

initTLS

public void initTLS(java.security.KeyStore key,
                    char[] password,
                    java.security.KeyStore trust)
             throws java.security.GeneralSecurityException
Initialize transport layer security (TLS) for network interactions using the trusted material (certificates, etc.) contained in the "trust" parameter..

Parameters:
key - The KeyStore containing the keys needed for secure network interaction with another device.
password - A char array containing the password used to access the key.
trust - The KeyStore object containing the source of certificates and trusted material.
Throws:
java.security.GeneralSecurityException

startListening

public void startListening(java.util.concurrent.Executor executor)
                    throws java.io.IOException
Bind to a socket and start listening for DICOM associations.

Parameters:
executor - The Executor threading implementation to use when binding to a socket.
Throws:
java.io.IOException

stopListening

public void stopListening()
Unbind from all active socket connections.


getNetworkApplicationEntity

public NetworkApplicationEntity getNetworkApplicationEntity(java.lang.String aet)
Get a specific NetworkApplicationEntity object by it's AE title.

Parameters:
aet - A String containing the AE title.
Returns:
The NetworkApplicationEntity corresponding to the aet parameter.


Copyright © 2011 dcm4che. All Rights Reserved.