class Configuration
CallId feature's configuration
Configuration()
CallId feature's configuration |
fun generate(block: CallIdProvider): Unit
block function will be applied when there is no call id retrieved. It should generate a string to be used
as call id or |
|
fun header(headerName: String): Unit
Setup retrieve/reply cycle via HTTP request and response headers headerName. Identical to retrieveFromHeader and replyToHeader invocations with the same headerName |
|
fun reply(block: (call: ApplicationCall, callId: String) -> Unit): Unit
Replies with retrieved or generated callId. Usually replyToHeader could be used instead. |
|
fun replyToHeader(headerName: String): Unit
Replies retrieved or generated callId using HTTP response header headerName |
|
fun retrieve(block: CallIdProvider): Unit
block will be used to retrieve call id from a call. It should return |
|
fun retrieveFromHeader(headerName: String): Unit
Fetch call id from a request header named headerName that is treated as optional |
|
fun verify(predicate: CallIdVerifier): Unit
Verify retrieved or generated call ids using the specified predicate. Should return fun verify(dictionary: String, reject: Boolean = false): Unit
Verify retrieved or generated call ids against the specified dictionary.
Rejects an ApplicationCall if reject is |
fun Configuration.generate(length: Int = 64, dictionary: String = CALL_ID_DEFAULT_DICTIONARY): Unit
Generates fixed length call ids using the specified dictionary. Please note that this function generates pseudo-random identifiers via regular java.util.Random and should not be considered as cryptographically secure. Also note that you should use the same dictionary for CallIdVerifier otherwise a generated call id could be discarded or may lead to complete call rejection. |