public class MCproposedContextList extends java.lang.Object implements java.lang.Iterable<MCproposedContext>
When an association is being established, the association acceptor and association requester each offer a list of contexts that the application entity is willing to support. Each context is a DICOM service and one or more transfer syntaxes that can be used.
Instances of this class can be used by multiple threads concurrently.
Constructor and Description |
---|
MCproposedContextList(MCproposedContext[] contexts)
Creates a new context list using the provided service information with no asynchronous
operation support.
|
MCproposedContextList(java.lang.String name)
Initializes a new proposed context list based on configured values with no asynchronous
operation support.
|
MCproposedContextList(java.lang.String name,
MCproposedContext[] contexts)
Creates a new context list using the provided service information and name with no asynchronous
operation support.
|
MCproposedContextList(java.lang.String name,
MCproposedContext[] contexts,
int maxInvokedOperations,
int maxPerformedOperations)
Creates a new context list using the provided service information and name with asynchronous
DICOM communication support.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes native resources associated with this context list.
|
MCproposedContext |
getContext(int index)
Gets the context at the specified index in this list.
|
MCproposedContext |
getContext(java.lang.String sop)
Gets the first context in this list for a specific service.
|
int |
getMaxOperationsInvoked()
Gets the maximum number of invoked asynchronous operations.
|
int |
getMaxOperationsPerformed()
Gets the maximum number of asynchronous operations performed.
|
java.lang.String |
getName()
Gets the name of this context list.
|
java.util.Iterator<MCproposedContext> |
iterator() |
int |
size()
Gets the number of contexts in this context list.
|
public MCproposedContextList(java.lang.String name)
This constructor loads the service information for the context list from the application service configuration file (mergecom.app).
name
- The name of a configured service list.MCexception
- If the name provided does not match any configured service list.public MCproposedContextList(MCproposedContext[] contexts)
The toolkit will assign a unique name for the context list.
contexts
- The array of contexts containing service information for this list.MCexception
- If the provided context array is null
or empty.public MCproposedContextList(java.lang.String name, MCproposedContext[] contexts)
name
- The name identifying this context list. This name must not match any
configured service list name and must consist of 1 to 33 characters.contexts
- The array of contexts containing service information for this list.MCexception
- If the provided context array is null
or empty or if the
name is invalid.public MCproposedContextList(java.lang.String name, MCproposedContext[] contexts, int maxInvokedOperations, int maxPerformedOperations)
name
- The name identifying this context list. This name must not match any
configured service list name and must consist of 1 to 33 characters.contexts
- The array of contexts containing service information for this list.maxInvokedOperations
- The maximum number of invoked asynchronous operations.maxPerformedOperations
- The maximum number of performed asynchronous operations.MCexception
- If the provided context array is null
or empty or if the
name is invalid.public java.lang.String getName()
public int size()
public int getMaxOperationsInvoked()
If the returned value is one, asynchronous operations are not supported by the application.
public int getMaxOperationsPerformed()
If the returned value is one, asynchronous operations are not supported by the application.
public MCproposedContext getContext(java.lang.String sop)
sop
- The SOP class UID or the service name of the context to return.null
if there is no context for the requested
service.public java.util.Iterator<MCproposedContext> iterator()
iterator
in interface java.lang.Iterable<MCproposedContext>
public MCproposedContext getContext(int index)
index
- The zero based index of the context to return.MCexception
- If the index is invalid.public void dispose()
If this context list is dynamic (not based on a configured service list), this method releases the native memory associated with this context list. For context lists that are based on configured service lists this method has no effect.
This method addresses memory consumption issues for special use cases when a large number of different context lists are created by the application. In a normal scenario an application creates only a limited number of context lists which are reused for subsequent associations or acceptors. In such cases disposal of context lists is not a concern since the memory used by them does not grow over time and automatic disposal on library release is acceptable.