Lines Matching refs:env

21 static jstring JNICALL nxt_java_Request_getHeader(JNIEnv *env, jclass cls,
23 static jobject JNICALL nxt_java_Request_getHeaderNames(JNIEnv *env, jclass cls,
25 static jobject JNICALL nxt_java_Request_getHeaders(JNIEnv *env, jclass cls,
27 static jint JNICALL nxt_java_Request_getIntHeader(JNIEnv *env, jclass cls,
29 static jstring JNICALL nxt_java_Request_getMethod(JNIEnv *env, jclass cls,
31 static jstring JNICALL nxt_java_Request_getQueryString(JNIEnv *env, jclass cls,
33 static jstring JNICALL nxt_java_Request_getRequestURI(JNIEnv *env, jclass cls,
35 static jlong JNICALL nxt_java_Request_getContentLength(JNIEnv *env, jclass cls,
37 static jstring JNICALL nxt_java_Request_getContentType(JNIEnv *env, jclass cls,
39 static jstring JNICALL nxt_java_Request_getLocalAddr(JNIEnv *env, jclass cls,
41 static jstring JNICALL nxt_java_Request_getLocalName(JNIEnv *env, jclass cls,
43 static jint JNICALL nxt_java_Request_getLocalPort(JNIEnv *env, jclass cls,
45 static jstring JNICALL nxt_java_Request_getProtocol(JNIEnv *env, jclass cls,
47 static jstring JNICALL nxt_java_Request_getRemoteAddr(JNIEnv *env, jclass cls,
49 static jstring JNICALL nxt_java_Request_getRemoteHost(JNIEnv *env, jclass cls,
51 static jint JNICALL nxt_java_Request_getRemotePort(JNIEnv *env, jclass cls,
53 static jstring JNICALL nxt_java_Request_getScheme(JNIEnv *env, jclass cls,
55 static jstring JNICALL nxt_java_Request_getServerName(JNIEnv *env, jclass cls,
57 static jint JNICALL nxt_java_Request_getServerPort(JNIEnv *env, jclass cls,
59 static jboolean JNICALL nxt_java_Request_isSecure(JNIEnv *env, jclass cls,
61 static void JNICALL nxt_java_Request_upgrade(JNIEnv *env, jclass cls,
63 static jboolean JNICALL nxt_java_Request_isUpgrade(JNIEnv *env, jclass cls,
65 static void JNICALL nxt_java_Request_log(JNIEnv *env, jclass cls,
67 static void JNICALL nxt_java_Request_trace(JNIEnv *env, jclass cls,
69 static jobject JNICALL nxt_java_Request_getResponse(JNIEnv *env, jclass cls,
71 static void JNICALL nxt_java_Request_sendWsFrameBuf(JNIEnv *env, jclass cls,
73 static void JNICALL nxt_java_Request_sendWsFrameArr(JNIEnv *env, jclass cls,
75 static void JNICALL nxt_java_Request_closeWs(JNIEnv *env, jclass cls,
86 nxt_java_initRequest(JNIEnv *env, jobject cl) in nxt_java_initRequest() argument
91 cls = nxt_java_loadClass(env, cl, "nginx.unit.Request"); in nxt_java_initRequest()
96 nxt_java_Request_class = (*env)->NewGlobalRef(env, cls); in nxt_java_initRequest()
97 (*env)->DeleteLocalRef(env, cls); in nxt_java_initRequest()
100 nxt_java_Request_ctor = (*env)->GetMethodID(env, cls, "<init>", "(Lnginx/unit/Context;JJ)V"); in nxt_java_initRequest()
102 (*env)->DeleteGlobalRef(env, cls); in nxt_java_initRequest()
106 …nxt_java_Request_processWsFrame = (*env)->GetMethodID(env, cls, "processWsFrame", "(Ljava/nio/Byte… in nxt_java_initRequest()
108 (*env)->DeleteGlobalRef(env, cls); in nxt_java_initRequest()
112 nxt_java_Request_closeWsSession = (*env)->GetMethodID(env, cls, "closeWsSession", "()V"); in nxt_java_initRequest()
114 (*env)->DeleteGlobalRef(env, cls); in nxt_java_initRequest()
233 res = (*env)->RegisterNatives(env, nxt_java_Request_class, in nxt_java_initRequest()
244 res = nxt_java_initHeadersEnumeration(env, cl); in nxt_java_initRequest()
249 res = nxt_java_initHeaderNamesEnumeration(env, cl); in nxt_java_initRequest()
258 (*env)->DeleteGlobalRef(env, cls); in nxt_java_initRequest()
264 nxt_java_newRequest(JNIEnv *env, jobject ctx, nxt_unit_request_info_t *req) in nxt_java_newRequest() argument
266 return (*env)->NewObject(env, nxt_java_Request_class, in nxt_java_newRequest()
273 nxt_java_Request_getHeader(JNIEnv *env, jclass cls, jlong req_ptr, in nxt_java_Request_getHeader() argument
280 name_str = (*env)->GetStringUTFChars(env, name, NULL); in nxt_java_Request_getHeader()
290 (*env)->ReleaseStringUTFChars(env, name, name_str); in nxt_java_Request_getHeader()
296 return (*env)->NewStringUTF(env, nxt_unit_sptr_get(&f->value)); in nxt_java_Request_getHeader()
301 nxt_java_Request_getHeaderNames(JNIEnv *env, jclass cls, jlong req_ptr) in nxt_java_Request_getHeaderNames() argument
307 return nxt_java_newHeaderNamesEnumeration(env, r->fields, r->fields_count); in nxt_java_Request_getHeaderNames()
312 nxt_java_Request_getHeaders(JNIEnv *env, jclass cls, jlong req_ptr, in nxt_java_Request_getHeaders() argument
319 name_str = (*env)->GetStringUTFChars(env, name, NULL); in nxt_java_Request_getHeaders()
329 (*env)->ReleaseStringUTFChars(env, name, name_str); in nxt_java_Request_getHeaders()
335 return nxt_java_newHeadersEnumeration(env, r->fields, r->fields_count, in nxt_java_Request_getHeaders()
341 nxt_java_Request_getIntHeader(JNIEnv *env, jclass cls, jlong req_ptr, in nxt_java_Request_getIntHeader() argument
352 name_str = (*env)->GetStringUTFChars(env, name, NULL); in nxt_java_Request_getIntHeader()
362 (*env)->ReleaseStringUTFChars(env, name, name_str); in nxt_java_Request_getIntHeader()
382 nxt_java_Request_getMethod(JNIEnv *env, jclass cls, jlong req_ptr) in nxt_java_Request_getMethod() argument
388 return (*env)->NewStringUTF(env, nxt_unit_sptr_get(&r->method)); in nxt_java_Request_getMethod()
393 nxt_java_Request_getQueryString(JNIEnv *env, jclass cls, jlong req_ptr) in nxt_java_Request_getQueryString() argument
402 return (*env)->NewStringUTF(env, query); in nxt_java_Request_getQueryString()
410 nxt_java_Request_getRequestURI(JNIEnv *env, jclass cls, jlong req_ptr) in nxt_java_Request_getRequestURI() argument
421 return nxt_java_newString(env, target, query - target - 1); in nxt_java_Request_getRequestURI()
424 return (*env)->NewStringUTF(env, target); in nxt_java_Request_getRequestURI()
429 nxt_java_Request_getContentLength(JNIEnv *env, jclass cls, jlong req_ptr) in nxt_java_Request_getContentLength() argument
440 nxt_java_Request_getContentType(JNIEnv *env, jclass cls, jlong req_ptr) in nxt_java_Request_getContentType() argument
450 return (*env)->NewStringUTF(env, nxt_unit_sptr_get(&f->value)); in nxt_java_Request_getContentType()
458 nxt_java_Request_getLocalAddr(JNIEnv *env, jclass cls, jlong req_ptr) in nxt_java_Request_getLocalAddr() argument
464 return nxt_java_newString(env, nxt_unit_sptr_get(&r->local_addr), in nxt_java_Request_getLocalAddr()
470 nxt_java_Request_getLocalName(JNIEnv *env, jclass cls, jlong req_ptr) in nxt_java_Request_getLocalName() argument
484 return nxt_java_newString(env, local, colon - local); in nxt_java_Request_getLocalName()
489 nxt_java_Request_getLocalPort(JNIEnv *env, jclass cls, jlong req_ptr) in nxt_java_Request_getLocalPort() argument
517 nxt_java_Request_getProtocol(JNIEnv *env, jclass cls, jlong req_ptr) in nxt_java_Request_getProtocol() argument
523 return (*env)->NewStringUTF(env, nxt_unit_sptr_get(&r->version)); in nxt_java_Request_getProtocol()
528 nxt_java_Request_getRemoteAddr(JNIEnv *env, jclass cls, jlong req_ptr) in nxt_java_Request_getRemoteAddr() argument
534 return nxt_java_newString(env, nxt_unit_sptr_get(&r->remote), in nxt_java_Request_getRemoteAddr()
540 nxt_java_Request_getRemoteHost(JNIEnv *env, jclass cls, jlong req_ptr) in nxt_java_Request_getRemoteHost() argument
554 return nxt_java_newString(env, remote, colon - remote); in nxt_java_Request_getRemoteHost()
559 nxt_java_Request_getRemotePort(JNIEnv *env, jclass cls, jlong req_ptr) in nxt_java_Request_getRemotePort() argument
587 nxt_java_Request_getScheme(JNIEnv *env, jclass cls, jlong req_ptr) in nxt_java_Request_getScheme() argument
593 return (*env)->NewStringUTF(env, r->tls ? "https" : "http"); in nxt_java_Request_getScheme()
598 nxt_java_Request_getServerName(JNIEnv *env, jclass cls, jlong req_ptr) in nxt_java_Request_getServerName() argument
617 return nxt_java_newString(env, host, colon - host); in nxt_java_Request_getServerName()
620 return nxt_java_Request_getLocalName(env, cls, req_ptr); in nxt_java_Request_getServerName()
625 nxt_java_Request_getServerPort(JNIEnv *env, jclass cls, jlong req_ptr) in nxt_java_Request_getServerPort() argument
656 return nxt_java_Request_getLocalPort(env, cls, req_ptr); in nxt_java_Request_getServerPort()
661 nxt_java_Request_isSecure(JNIEnv *env, jclass cls, jlong req_ptr) in nxt_java_Request_isSecure() argument
672 nxt_java_Request_upgrade(JNIEnv *env, jclass cls, jlong req_info_ptr) in nxt_java_Request_upgrade() argument
687 nxt_java_Request_isUpgrade(JNIEnv *env, jclass cls, jlong req_info_ptr) in nxt_java_Request_isUpgrade() argument
698 nxt_java_Request_log(JNIEnv *env, jclass cls, jlong req_info_ptr, jstring msg, in nxt_java_Request_log() argument
706 msg_str = (*env)->GetStringUTFChars(env, msg, NULL); in nxt_java_Request_log()
713 (*env)->ReleaseStringUTFChars(env, msg, msg_str); in nxt_java_Request_log()
718 nxt_java_Request_trace(JNIEnv *env, jclass cls, jlong req_info_ptr, jstring msg, in nxt_java_Request_trace() argument
727 msg_str = (*env)->GetStringUTFChars(env, msg, NULL); in nxt_java_Request_trace()
734 (*env)->ReleaseStringUTFChars(env, msg, msg_str); in nxt_java_Request_trace()
740 nxt_java_Request_getResponse(JNIEnv *env, jclass cls, jlong req_info_ptr) in nxt_java_Request_getResponse() argument
753 nxt_java_Request_sendWsFrameBuf(JNIEnv *env, jclass cls, in nxt_java_Request_sendWsFrameBuf() argument
759 uint8_t *b = (*env)->GetDirectBufferAddress(env, buf); in nxt_java_Request_sendWsFrameBuf()
771 nxt_java_Request_sendWsFrameArr(JNIEnv *env, jclass cls, in nxt_java_Request_sendWsFrameArr() argument
777 uint8_t *b = (*env)->GetPrimitiveArrayCritical(env, arr, NULL); in nxt_java_Request_sendWsFrameArr()
786 (*env)->ReleasePrimitiveArrayCritical(env, arr, b, 0); in nxt_java_Request_sendWsFrameArr()
795 nxt_java_Request_closeWs(JNIEnv *env, jclass cls, jlong req_info_ptr) in nxt_java_Request_closeWs() argument
804 (*env)->DeleteGlobalRef(env, data->jresp); in nxt_java_Request_closeWs()
805 (*env)->DeleteGlobalRef(env, data->jreq); in nxt_java_Request_closeWs()
812 nxt_java_Request_websocket(JNIEnv *env, jobject jreq, jobject jbuf, in nxt_java_Request_websocket() argument
815 (*env)->CallVoidMethod(env, jreq, nxt_java_Request_processWsFrame, jbuf, opcode, fin); in nxt_java_Request_websocket()
820 nxt_java_Request_close(JNIEnv *env, jobject jreq) in nxt_java_Request_close() argument
822 (*env)->CallVoidMethod(env, jreq, nxt_java_Request_closeWsSession); in nxt_java_Request_close()