public abstract class BaseMethodBinding<T> extends Object implements IClientResponseHandler<T>
| Modifier and Type | Class and Description |
|---|---|
static class |
BaseMethodBinding.ActiveRequestReader |
static class |
BaseMethodBinding.InactiveRequestReader |
static interface |
BaseMethodBinding.IRequestReader |
| Constructor and Description |
|---|
BaseMethodBinding(Method theMethod,
FhirContext theContext,
Object theProvider) |
| Modifier and Type | Method and Description |
|---|---|
static BaseMethodBinding<?> |
bindMethod(Method theMethod,
FhirContext theContext,
Object theProvider) |
protected IParser |
createAppropriateParserForParsingResponse(String theResponseMimeType,
Reader theResponseReader,
int theResponseStatusCode) |
protected IParser |
createAppropriateParserForParsingServerRequest(RequestDetails theRequest) |
protected Object[] |
createParametersForServerRequest(RequestDetails theRequest) |
List<Class<?>> |
getAllowableParamAnnotations() |
FhirContext |
getContext() |
Set<String> |
getIncludes() |
Method |
getMethod() |
List<IParameter> |
getParameters() |
Object |
getProvider() |
Set<Include> |
getRequestIncludesFromParams(Object[] params) |
abstract String |
getResourceName()
Returns the name of the resource this method handles, or
null if this method is not resource specific |
abstract RestOperationTypeEnum |
getRestOperationType() |
RestOperationTypeEnum |
getRestOperationType(RequestDetails theRequestDetails)
Determine which operation is being fired for a specific request
|
abstract boolean |
incomingServerRequestMatchesMethod(RequestDetails theRequest) |
abstract BaseHttpClientInvocation |
invokeClient(Object[] theArgs) |
abstract Object |
invokeServer(IRestfulServer<?> theServer,
RequestDetails theRequest) |
protected Object |
invokeServerMethod(IRestfulServer<?> theServer,
RequestDetails theRequest,
Object[] theMethodParams) |
boolean |
isSupportsConditional()
Does this method have a parameter annotated with
ConditionalParamBinder. |
boolean |
isSupportsConditionalMultiple()
Does this method support conditional operations over multiple objects (basically for conditional delete)
|
protected void |
populateActionRequestDetailsForInterceptor(RequestDetails theRequestDetails,
IServerInterceptor.ActionRequestDetails theDetails,
Object[] theMethodParams)
Subclasses may override this method (but should also call super.
#populateActionRequestDetailsForInterceptor(RequestDetails, ActionRequestDetails, Object[]) to provide method specifics to the
interceptors. |
protected BaseServerResponseException |
processNon2xxResponseAndReturnExceptionToThrow(int theStatusCode,
String theResponseMimeType,
Reader theResponseReader) |
void |
setParameters(List<IParameter> theParameters)
For unit tests only
|
protected IBundleProvider |
toResourceList(Object response) |
static boolean |
verifyMethodHasZeroOrOneOperationAnnotation(Method theNextMethod,
Object... theAnnotations) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinvokeClientpublic BaseMethodBinding(Method theMethod, FhirContext theContext, Object theProvider)
protected IParser createAppropriateParserForParsingResponse(String theResponseMimeType, Reader theResponseReader, int theResponseStatusCode)
protected IParser createAppropriateParserForParsingServerRequest(RequestDetails theRequest)
protected Object[] createParametersForServerRequest(RequestDetails theRequest)
public List<Class<?>> getAllowableParamAnnotations()
public FhirContext getContext()
public Set<String> getIncludes()
public List<IParameter> getParameters()
public Object getProvider()
public Set<Include> getRequestIncludesFromParams(Object[] params)
public abstract String getResourceName()
null if this method is not resource specificpublic abstract RestOperationTypeEnum getRestOperationType()
public RestOperationTypeEnum getRestOperationType(RequestDetails theRequestDetails)
theRequestDetails - The requestpublic abstract boolean incomingServerRequestMatchesMethod(RequestDetails theRequest)
public abstract BaseHttpClientInvocation invokeClient(Object[] theArgs) throws InternalErrorException
InternalErrorExceptionpublic abstract Object invokeServer(IRestfulServer<?> theServer, RequestDetails theRequest) throws BaseServerResponseException, IOException
protected final Object invokeServerMethod(IRestfulServer<?> theServer, RequestDetails theRequest, Object[] theMethodParams)
public boolean isSupportsConditional()
ConditionalParamBinder. Note that many operations don't actually support this paramter, so this will only return true occasionally.public boolean isSupportsConditionalMultiple()
protected void populateActionRequestDetailsForInterceptor(RequestDetails theRequestDetails, IServerInterceptor.ActionRequestDetails theDetails, Object[] theMethodParams)
#populateActionRequestDetailsForInterceptor(RequestDetails, ActionRequestDetails, Object[]) to provide method specifics to the
interceptors.theRequestDetails - The server request detailstheDetails - The details object to populatetheMethodParams - The method params as generated by the specific method bindingprotected BaseServerResponseException processNon2xxResponseAndReturnExceptionToThrow(int theStatusCode, String theResponseMimeType, Reader theResponseReader)
public void setParameters(List<IParameter> theParameters)
protected IBundleProvider toResourceList(Object response) throws InternalErrorException
InternalErrorExceptionpublic static BaseMethodBinding<?> bindMethod(Method theMethod, FhirContext theContext, Object theProvider)
public static boolean verifyMethodHasZeroOrOneOperationAnnotation(Method theNextMethod, Object... theAnnotations)
Copyright © 2014–2016 University Health Network. All rights reserved.