public class ResponsePolicy
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ResponsePolicy.SupportedContext
This class represents an abstract syntax (aka SOP Class) in combination
with a number of transfer syntaxes for which the abstract syntax is
supported.
|
Constructor and Description |
---|
ResponsePolicy() |
Modifier and Type | Method and Description |
---|---|
static int |
getResultForAbstractSyntax(Request request,
Acknowledge ack,
int asid)
returns the result in an Acknowledge for a proposed abstract syntax
in a Request.
|
static Response |
prepareResponse(Request request,
java.lang.String calledtitle,
java.lang.String[] callingtitles,
int[] asids,
int[] tsids,
boolean rejectnocontext)
Deprecated.
This method is maintained for backwards compatibility.
New implementations should use {#prepareResponse(Request,String,String[],SupportedContext[],boolean)}.
|
static Response |
prepareResponse(Request request,
java.lang.String calledtitle,
java.lang.String[] callingtitles,
int[] asids,
int tsid,
boolean rejectnocontext)
Deprecated.
This method is maintained for backwards compatibility.
New implementations should use {#prepareResponse(Request,String,String[],SupportedContext[],boolean)}.
|
static Response |
prepareResponse(Request request,
java.lang.String calledtitle,
java.lang.String[] callingtitles,
ResponsePolicy.SupportedContext[] contexts,
boolean rejectnocontext)
creates a Response Object that accepts the specified supported contexts
and refuses all others.
|
public static Response prepareResponse(Request request, java.lang.String calledtitle, java.lang.String[] callingtitles, int[] asids, int tsid, boolean rejectnocontext) throws IllegalValueException
request
- the Request for which to create an Responsecalledtitle
- the allowed called title in the request or null if no check on called title is necessarycallingtitles
- the allowed calling titles in the request or null if no check on calling title is necessaryasids
- the allowed abstract syntaxestsid
- the allowed transfer syntax.rejectnocontext
- whether or not to return a reject when no proposed presentation context in the request can be acceptedIllegalValueException
- IllegalValueExceptionpublic static Response prepareResponse(Request request, java.lang.String calledtitle, java.lang.String[] callingtitles, int[] asids, int[] tsids, boolean rejectnocontext) throws IllegalValueException
request
- the Request for which to create an Responsecalledtitle
- the allowed called title in the request or null if no check on called title is necessarycallingtitles
- the allowed calling titles in the request or null if no check on calling title is necessaryasids
- the allowed abstract syntaxes.tsids
- the allowed transfer syntaxes.rejectnocontext
- whether or not to return a reject when no proposed presentation context in the request can be acceptedIllegalValueException
public static Response prepareResponse(Request request, java.lang.String calledtitle, java.lang.String[] callingtitles, ResponsePolicy.SupportedContext[] contexts, boolean rejectnocontext) throws IllegalValueException
request
- Requestcalledtitle
- Stringcallingtitles
- String[]contexts
- SupportedContext[]rejectnocontext
- boolean whether or not to return a reject when no proposed presentation context in the request can be acceptedIllegalValueException
public static int getResultForAbstractSyntax(Request request, Acknowledge ack, int asid) throws IllegalValueException
request
- the Request.ack
- the Acknowledge for which to return the result in accordance with the Request request.asid
- the abstract syntaxIllegalValueException
- is thrown
when the abstract syntax was not proposed in the request or
when there is no correspondence between the presentation context IDs
of request and acknowledge for the specified abstract syntax.