class RedoxClient extends RedoxClientComponents
Created by apatzer on 3/20/17.
- Alphabetic
- By Inheritance
- RedoxClient
- RedoxClientComponents
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new RedoxClient(conf: ClientConfig, client: HttpClient, tokenManager: RedoxTokenManager, reducer: (JsValue) ⇒ JsValue = _.reduceNullSubtrees)(implicit system: ActorSystem, materializer: Materializer)
-
new
RedoxClient(conf: Config)(implicit system: ActorSystem, materializer: Materializer)
Use default reducer, with internally initialized http client and token manager.
Use default reducer, with internally initialized http client and token manager.
- Deprecated
prefer initializing the HttpClient and token manager outside RedoxClient. Do not create more than one RedoxClient with this constructor as it will initialize duplicate TokenManagers and http clients.
-
new
RedoxClient(conf: Config, client: HttpClient, reducer: (JsValue) ⇒ JsValue)(implicit system: ActorSystem, materializer: Materializer)
Initialize and internal HttpClient and a token manager.
Initialize and internal HttpClient and a token manager. Added for backward compatibility.
- Deprecated
prefer initializing the HttpClient and token manager outside RedoxClient. Do not create more than one RedoxClient with this constructor as it will initialize duplicate TokenManagers and http clients.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
basePost: Self
- Attributes
- protected
- Definition Classes
- RedoxClientComponents
-
def
baseQuery: Self
- Attributes
- protected
- Definition Classes
- RedoxClientComponents
-
def
baseRequest(url: String): StandaloneWSRequest
- Attributes
- protected
- Definition Classes
- RedoxClientComponents
-
def
baseUpload: Self
- Attributes
- protected
- Definition Classes
- RedoxClientComponents
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
execute[T](request: StandaloneWSRequest)(implicit format: Reads[T]): Future[RedoxResponse[T]]
Raw request execution
Raw request execution
- Attributes
- protected
- Definition Classes
- RedoxClientComponents
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
get[T, U](query: T)(implicit writes: Writes[T], reads: Reads[U]): Future[RedoxResponse[U]]
Send a query/read-request of type 'T' expecting a response of type 'U' Ex.
Send a query/read-request of type 'T' expecting a response of type 'U' Ex. get[PatientQuery => case ClinicalSummary](query)
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- implicit val materializer: Materializer
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
post[T, U](data: T)(implicit writes: Writes[T], reads: Reads[U]): Future[RedoxResponse[U]]
Send a post/write-request of type 'T' expecting a response of type 'U' Ex.
Send a post/write-request of type 'T' expecting a response of type 'U' Ex. post[ClinicalSummary => case EmptyResponse](data)
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- implicit val system: ActorSystem
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
upload(file: File, fileContentType: String = "text/plain", contentLength: Long = 2097000L): Future[RedoxResponse[Upload]]
Uploads a file to the Redox /uploads endpoint.
Uploads a file to the Redox /uploads endpoint. Provides sensible defaults for file content type and content length.
- file
The file to upload to Redox.
- fileContentType
The content type of the file (used when converting the file to a source stream. Defaults to 'text/plain'.
- contentLength
The length that will be used to set the 'content-length' on the request. Provides a default value of of ~2MB (2,097,000 octets). This is needed as when we provide a Source we have to manually set the length or the backend http client will chunk the request. (src: play.api.libs.ws.ahc.StandaloneAhcWSRequest#buildRequest() line: 303).
- returns
A future containing the redox upload response.
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )