class ChannelInterceptor extends AbstractController
This class intercepts a request before it gets to the BatchChannel or GroupChannel. It has several purposes: exception handling, final WebSocket creation, and matching to the right worker type.
- Annotations
- @Singleton() @PublixAccessLogging()
- Alphabetic
- By Inheritance
- ChannelInterceptor
- AbstractController
- BaseController
- BaseControllerHelpers
- ControllerHelpers
- RequestImplicits
- Rendering
- RequestExtractors
- AcceptExtractors
- ContentTypes
- HeaderNames
- Status
- HttpProtocol
- Results
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ChannelInterceptor(components: ControllerComponents, jpa: JPAApi, studyResultDao: StudyResultDao, jatosBatchChannel: JatosBatchChannel, personalSingleBatchChannel: PersonalSingleBatchChannel, personalMultipleBatchChannel: PersonalMultipleBatchChannel, generalSingleBatchChannel: GeneralSingleBatchChannel, generalMultipleBatchChannel: GeneralMultipleBatchChannel, mTBatchChannel: MTBatchChannel, jatosGroupChannel: JatosGroupChannel, personalSingleGroupChannel: PersonalSingleGroupChannel, personalMultipleGroupChannel: PersonalMultipleGroupChannel, generalSingleGroupChannel: GeneralSingleGroupChannel, generalMultipleGroupChannel: GeneralMultipleGroupChannel, mTGroupChannel: MTGroupChannel)
- Annotations
- @Inject()
Type Members
- class Status extends Result
- Definition Classes
- Results
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
- val ACCEPT: String
- Definition Classes
- HeaderNames
- val ACCEPTED: Int
- Definition Classes
- Status
- val ACCEPT_CHARSET: String
- Definition Classes
- HeaderNames
- val ACCEPT_ENCODING: String
- Definition Classes
- HeaderNames
- val ACCEPT_LANGUAGE: String
- Definition Classes
- HeaderNames
- val ACCEPT_RANGES: String
- Definition Classes
- HeaderNames
- val ACCESS_CONTROL_ALLOW_CREDENTIALS: String
- Definition Classes
- HeaderNames
- val ACCESS_CONTROL_ALLOW_HEADERS: String
- Definition Classes
- HeaderNames
- val ACCESS_CONTROL_ALLOW_METHODS: String
- Definition Classes
- HeaderNames
- val ACCESS_CONTROL_ALLOW_ORIGIN: String
- Definition Classes
- HeaderNames
- val ACCESS_CONTROL_EXPOSE_HEADERS: String
- Definition Classes
- HeaderNames
- val ACCESS_CONTROL_MAX_AGE: String
- Definition Classes
- HeaderNames
- val ACCESS_CONTROL_REQUEST_HEADERS: String
- Definition Classes
- HeaderNames
- val ACCESS_CONTROL_REQUEST_METHOD: String
- Definition Classes
- HeaderNames
- val AGE: String
- Definition Classes
- HeaderNames
- val ALLOW: String
- Definition Classes
- HeaderNames
- val AUTHORIZATION: String
- Definition Classes
- HeaderNames
- val Accepted: Status
- Definition Classes
- Results
- def Action: ActionBuilder[Request, AnyContent]
- Definition Classes
- BaseController
- val BAD_GATEWAY: Int
- Definition Classes
- Status
- val BAD_REQUEST: Int
- Definition Classes
- Status
- val BINARY: String
- Definition Classes
- ContentTypes
- val BadGateway: Status
- Definition Classes
- Results
- val BadRequest: Status
- Definition Classes
- Results
- val CACHE_CONTROL: String
- Definition Classes
- HeaderNames
- val CACHE_MANIFEST: String
- Definition Classes
- ContentTypes
- val CHUNKED: String
- Definition Classes
- HttpProtocol
- val CONFLICT: Int
- Definition Classes
- Status
- val CONNECTION: String
- Definition Classes
- HeaderNames
- val CONTENT_DISPOSITION: String
- Definition Classes
- HeaderNames
- val CONTENT_ENCODING: String
- Definition Classes
- HeaderNames
- val CONTENT_LANGUAGE: String
- Definition Classes
- HeaderNames
- val CONTENT_LENGTH: String
- Definition Classes
- HeaderNames
- val CONTENT_LOCATION: String
- Definition Classes
- HeaderNames
- val CONTENT_MD5: String
- Definition Classes
- HeaderNames
- val CONTENT_RANGE: String
- Definition Classes
- HeaderNames
- val CONTENT_SECURITY_POLICY: String
- Definition Classes
- HeaderNames
- val CONTENT_SECURITY_POLICY_REPORT_ONLY: String
- Definition Classes
- HeaderNames
- val CONTENT_TRANSFER_ENCODING: String
- Definition Classes
- HeaderNames
- val CONTENT_TYPE: String
- Definition Classes
- HeaderNames
- val CONTINUE: Int
- Definition Classes
- Status
- val COOKIE: String
- Definition Classes
- HeaderNames
- val CREATED: Int
- Definition Classes
- Status
- def CSS(implicit codec: Codec): String
- Definition Classes
- ContentTypes
- val Conflict: Status
- Definition Classes
- Results
- val Continue: Result
- Definition Classes
- Results
- val Created: Status
- Definition Classes
- Results
- val DATE: String
- Definition Classes
- HeaderNames
- val ETAG: String
- Definition Classes
- HeaderNames
- def EVENT_STREAM(implicit codec: Codec): String
- Definition Classes
- ContentTypes
- val EXPECT: String
- Definition Classes
- HeaderNames
- val EXPECTATION_FAILED: Int
- Definition Classes
- Status
- val EXPIRES: String
- Definition Classes
- HeaderNames
- val EntityTooLarge: Status
- Definition Classes
- Results
- val ExpectationFailed: Status
- Definition Classes
- Results
- val FAILED_DEPENDENCY: Int
- Definition Classes
- Status
- val FORBIDDEN: Int
- Definition Classes
- Status
- val FORM: String
- Definition Classes
- ContentTypes
- val FORWARDED: String
- Definition Classes
- HeaderNames
- val FOUND: Int
- Definition Classes
- Status
- val FROM: String
- Definition Classes
- HeaderNames
- val FailedDependency: Status
- Definition Classes
- Results
- val Forbidden: Status
- Definition Classes
- Results
- def Found(url: String): Result
- Definition Classes
- Results
- val GATEWAY_TIMEOUT: Int
- Definition Classes
- Status
- val GONE: Int
- Definition Classes
- Status
- val GatewayTimeout: Status
- Definition Classes
- Results
- val Gone: Status
- Definition Classes
- Results
- val HOST: String
- Definition Classes
- HeaderNames
- def HTML(implicit codec: Codec): String
- Definition Classes
- ContentTypes
- val HTTP_1_0: String
- Definition Classes
- HttpProtocol
- val HTTP_1_1: String
- Definition Classes
- HttpProtocol
- val HTTP_VERSION_NOT_SUPPORTED: Int
- Definition Classes
- Status
- val HttpVersionNotSupported: Status
- Definition Classes
- Results
- val IF_MATCH: String
- Definition Classes
- HeaderNames
- val IF_MODIFIED_SINCE: String
- Definition Classes
- HeaderNames
- val IF_NONE_MATCH: String
- Definition Classes
- HeaderNames
- val IF_RANGE: String
- Definition Classes
- HeaderNames
- val IF_UNMODIFIED_SINCE: String
- Definition Classes
- HeaderNames
- val IM_A_TEAPOT: Int
- Definition Classes
- Status
- val INSUFFICIENT_STORAGE: Int
- Definition Classes
- Status
- val INTERNAL_SERVER_ERROR: Int
- Definition Classes
- Status
- val ImATeapot: Status
- Definition Classes
- Results
- val InsufficientStorage: Status
- Definition Classes
- Results
- val InternalServerError: Status
- Definition Classes
- Results
- def JAVASCRIPT(implicit codec: Codec): String
- Definition Classes
- ContentTypes
- val JSON: String
- Definition Classes
- ContentTypes
- val LAST_MODIFIED: String
- Definition Classes
- HeaderNames
- val LENGTH_REQUIRED: Int
- Definition Classes
- Status
- val LINK: String
- Definition Classes
- HeaderNames
- val LOCATION: String
- Definition Classes
- HeaderNames
- val LOCKED: Int
- Definition Classes
- Status
- val Locked: Status
- Definition Classes
- Results
- val MAX_FORWARDS: String
- Definition Classes
- HeaderNames
- val METHOD_NOT_ALLOWED: Int
- Definition Classes
- Status
- val MOVED_PERMANENTLY: Int
- Definition Classes
- Status
- val MULTIPLE_CHOICES: Int
- Definition Classes
- Status
- val MULTI_STATUS: Int
- Definition Classes
- Status
- val MethodNotAllowed: Status
- Definition Classes
- Results
- def MovedPermanently(url: String): Result
- Definition Classes
- Results
- val MultiStatus: Status
- Definition Classes
- Results
- val NETWORK_AUTHENTICATION_REQUIRED: Int
- Definition Classes
- Status
- val NON_AUTHORITATIVE_INFORMATION: Int
- Definition Classes
- Status
- val NOT_ACCEPTABLE: Int
- Definition Classes
- Status
- val NOT_FOUND: Int
- Definition Classes
- Status
- val NOT_IMPLEMENTED: Int
- Definition Classes
- Status
- val NOT_MODIFIED: Int
- Definition Classes
- Status
- val NO_CONTENT: Int
- Definition Classes
- Status
- val NetworkAuthenticationRequired: Status
- Definition Classes
- Results
- val NoContent: Result
- Definition Classes
- Results
- val NonAuthoritativeInformation: Status
- Definition Classes
- Results
- val NotAcceptable: Status
- Definition Classes
- Results
- val NotFound: Status
- Definition Classes
- Results
- val NotImplemented: Status
- Definition Classes
- Results
- val NotModified: Result
- Definition Classes
- Results
- val OK: Int
- Definition Classes
- Status
- val ORIGIN: String
- Definition Classes
- HeaderNames
- val Ok: Status
- Definition Classes
- Results
- val PARTIAL_CONTENT: Int
- Definition Classes
- Status
- val PAYMENT_REQUIRED: Int
- Definition Classes
- Status
- val PERMANENT_REDIRECT: Int
- Definition Classes
- Status
- val PRAGMA: String
- Definition Classes
- HeaderNames
- val PRECONDITION_FAILED: Int
- Definition Classes
- Status
- val PRECONDITION_REQUIRED: Int
- Definition Classes
- Status
- val PROXY_AUTHENTICATE: String
- Definition Classes
- HeaderNames
- val PROXY_AUTHENTICATION_REQUIRED: Int
- Definition Classes
- Status
- val PROXY_AUTHORIZATION: String
- Definition Classes
- HeaderNames
- val PartialContent: Status
- Definition Classes
- Results
- val PaymentRequired: Status
- Definition Classes
- Results
- def PermanentRedirect(url: String): Result
- Definition Classes
- Results
- val PreconditionFailed: Status
- Definition Classes
- Results
- val PreconditionRequired: Status
- Definition Classes
- Results
- val RANGE: String
- Definition Classes
- HeaderNames
- val REFERER: String
- Definition Classes
- HeaderNames
- val REFERRER_POLICY: String
- Definition Classes
- HeaderNames
- val REQUESTED_RANGE_NOT_SATISFIABLE: Int
- Definition Classes
- Status
- val REQUEST_ENTITY_TOO_LARGE: Int
- Definition Classes
- Status
- val REQUEST_HEADER_FIELDS_TOO_LARGE: Int
- Definition Classes
- Status
- val REQUEST_TIMEOUT: Int
- Definition Classes
- Status
- val REQUEST_URI_TOO_LONG: Int
- Definition Classes
- Status
- val RESET_CONTENT: Int
- Definition Classes
- Status
- val RETRY_AFTER: String
- Definition Classes
- HeaderNames
- def Redirect(call: Call, status: Int): Result
- Definition Classes
- Results
- def Redirect(call: Call): Result
- Definition Classes
- Results
- def Redirect(url: String, queryString: Map[String, Seq[String]], status: Int): Result
- Definition Classes
- Results
- def Redirect(url: String, status: Int): Result
- Definition Classes
- Results
- val RequestHeaderFieldsTooLarge: Status
- Definition Classes
- Results
- val RequestTimeout: Status
- Definition Classes
- Results
- val ResetContent: Result
- Definition Classes
- Results
- val SEE_OTHER: Int
- Definition Classes
- Status
- val SERVER: String
- Definition Classes
- HeaderNames
- val SERVICE_UNAVAILABLE: Int
- Definition Classes
- Status
- val SET_COOKIE: String
- Definition Classes
- HeaderNames
- val SET_COOKIE2: String
- Definition Classes
- HeaderNames
- val STRICT_TRANSPORT_SECURITY: String
- Definition Classes
- HeaderNames
- val SWITCHING_PROTOCOLS: Int
- Definition Classes
- Status
- def SeeOther(url: String): Result
- Definition Classes
- Results
- val ServiceUnavailable: Status
- Definition Classes
- Results
- def Status(code: Int): Status
- Definition Classes
- Results
- val SwitchingProtocols: Result
- Definition Classes
- Results
- val TE: String
- Definition Classes
- HeaderNames
- val TEMPORARY_REDIRECT: Int
- Definition Classes
- Status
- def TEXT(implicit codec: Codec): String
- Definition Classes
- ContentTypes
- lazy val TODO: Action[AnyContent]
- Definition Classes
- ControllerHelpers
- val TOO_MANY_REQUESTS: Int
- Definition Classes
- Status
- val TRAILER: String
- Definition Classes
- HeaderNames
- val TRANSFER_ENCODING: String
- Definition Classes
- HeaderNames
- def TemporaryRedirect(url: String): Result
- Definition Classes
- Results
- val TooManyRequests: Status
- Definition Classes
- Results
- val UNAUTHORIZED: Int
- Definition Classes
- Status
- val UNPROCESSABLE_ENTITY: Int
- Definition Classes
- Status
- val UNSUPPORTED_MEDIA_TYPE: Int
- Definition Classes
- Status
- val UPGRADE: String
- Definition Classes
- HeaderNames
- val UPGRADE_REQUIRED: Int
- Definition Classes
- Status
- val USER_AGENT: String
- Definition Classes
- HeaderNames
- val USE_PROXY: Int
- Definition Classes
- Status
- val Unauthorized: Status
- Definition Classes
- Results
- val UnprocessableEntity: Status
- Definition Classes
- Results
- val UnsupportedMediaType: Status
- Definition Classes
- Results
- val UriTooLong: Status
- Definition Classes
- Results
- val VARY: String
- Definition Classes
- HeaderNames
- val VIA: String
- Definition Classes
- HeaderNames
- val WARNING: String
- Definition Classes
- HeaderNames
- val WWW_AUTHENTICATE: String
- Definition Classes
- HeaderNames
- def XHTML(implicit codec: Codec): String
- Definition Classes
- ContentTypes
- def XML(implicit codec: Codec): String
- Definition Classes
- ContentTypes
- val X_CONTENT_SECURITY_POLICY_NONCE_HEADER: String
- Definition Classes
- HeaderNames
- val X_CONTENT_TYPE_OPTIONS: String
- Definition Classes
- HeaderNames
- val X_FORWARDED_FOR: String
- Definition Classes
- HeaderNames
- val X_FORWARDED_HOST: String
- Definition Classes
- HeaderNames
- val X_FORWARDED_PORT: String
- Definition Classes
- HeaderNames
- val X_FORWARDED_PROTO: String
- Definition Classes
- HeaderNames
- val X_FRAME_OPTIONS: String
- Definition Classes
- HeaderNames
- val X_PERMITTED_CROSS_DOMAIN_POLICIES: String
- Definition Classes
- HeaderNames
- val X_REQUESTED_WITH: String
- Definition Classes
- HeaderNames
- val X_XSS_PROTECTION: String
- Definition Classes
- HeaderNames
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val controllerComponents: ControllerComponents
- Attributes
- protected
- Definition Classes
- AbstractController → BaseControllerHelpers
- def defaultExecutionContext: ExecutionContext
- Definition Classes
- BaseControllerHelpers
- implicit lazy val defaultFormBinding: FormBinding
- Definition Classes
- BaseControllerHelpers
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- implicit def fileMimeTypes: FileMimeTypes
- Definition Classes
- BaseControllerHelpers
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def joinGroup(studyResultUuid: String): WebSocket
HTTP type: WebSocket
HTTP type: WebSocket
Let the worker (actually it's StudyResult) join a group (actually a GroupResult) and open a WebSocket (group channel). Only works if this study is a group study. All group data are stored in a GroupResult and the group channels will be handled by a GroupDispatcher which uses Akka.
- studyResultUuid
Study reslt's UUID
- returns
WebSocket that transfers JSON
- def leaveGroup(studyResultUuid: String): Action[AnyContent]
HTTP type: Ajax GET request
HTTP type: Ajax GET request
Let the worker leave the group (actually a GroupResult) he joined before and closes the group channel. Only works if this study is a group study.
- studyResultUuid
Study reslt's UUID
- returns
Result
- Annotations
- @throws(classOf[PublixException])
- Exceptions thrown
PublixException
will be handled in the global ErrorHandler
- implicit def messagesApi: MessagesApi
- Definition Classes
- BaseControllerHelpers
- 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 openBatch(studyResultUuid: String): WebSocket
HTTP type: WebSocket
HTTP type: WebSocket
Endpoint that opens a WebSocket for the batch channel that is used to exchange data (batch session data) between study runs of a batch. All batch session data are stored in a Batch model and the batch channels will be handled by a BatchDispatcher which uses Akka.
- studyResultUuid
Study reslt's UUID
- returns
WebSocket that transports JSON strings.
- def parse: PlayBodyParsers
- Definition Classes
- BaseControllerHelpers
- def reassignGroup(studyResultUuid: String): Action[AnyContent]
HTTP type: Ajax GET request
HTTP type: Ajax GET request
Try to find a different group for this StudyResult. It reuses the already opened group channel and just reassigns it to a different group (or in more detail to a different GroupResult and GroupDispatcher). If it is successful it returns an 200 (OK) HTTP status code. If it can't find any other group it returns a 204 (NO CONTENT) HTTP status code.
- studyResultUuid
Study reslt's UUID
- returns
Result
- Annotations
- @throws(classOf[PublixException])
- Exceptions thrown
PublixException
will be handled in the global ErrorHandler
- implicit def request2flash(implicit request: RequestHeader): Flash
- Definition Classes
- RequestImplicits
- implicit def request2session(implicit request: RequestHeader): Session
- Definition Classes
- RequestImplicits
- implicit def supportedLangs: Langs
- Definition Classes
- BaseControllerHelpers
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def withCharset(mimeType: String)(implicit codec: Codec): String
- Definition Classes
- ContentTypes