1e76eebc6SAndrew Rist#**************************************************************
2e76eebc6SAndrew Rist#
3e76eebc6SAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
4e76eebc6SAndrew Rist#  or more contributor license agreements.  See the NOTICE file
5e76eebc6SAndrew Rist#  distributed with this work for additional information
6e76eebc6SAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
7e76eebc6SAndrew Rist#  to you under the Apache License, Version 2.0 (the
8e76eebc6SAndrew Rist#  "License"); you may not use this file except in compliance
9e76eebc6SAndrew Rist#  with the License.  You may obtain a copy of the License at
10e76eebc6SAndrew Rist#
11e76eebc6SAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
12e76eebc6SAndrew Rist#
13e76eebc6SAndrew Rist#  Unless required by applicable law or agreed to in writing,
14e76eebc6SAndrew Rist#  software distributed under the License is distributed on an
15e76eebc6SAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16e76eebc6SAndrew Rist#  KIND, either express or implied.  See the License for the
17e76eebc6SAndrew Rist#  specific language governing permissions and limitations
18e76eebc6SAndrew Rist#  under the License.
19e76eebc6SAndrew Rist#
20e76eebc6SAndrew Rist#**************************************************************
21cdf0e10cSrcweir
22cdf0e10cSrcweirTest that a Java URP bridge started in a native process uses the same thread
23cdf0e10cSrcweirpool as a C++ URP bridge.  This test currently only works on Linux Intel.
24cdf0e10cSrcweir
25cdf0e10cSrcweirThere are two processes involved.  The client starts as a native process.  It
26cdf0e10cSrcweirfirst loads a Java component (Relay) via the in-process JNI bridge, which in
27*30acf5e8Spfgturn starts to accept incoming URP connections.  The native part of the client
28cdf0e10cSrcweirthen connects to the server, retrieves a thread-local token from it, and checks
29cdf0e10cSrcweirthe token for correctness.  The server simply waits for a connection from the
30cdf0e10cSrcweirnative part of the client, creates a connection to the Java part of the client,
31cdf0e10cSrcweirand routes all requests from the native part of the client to the Java part of
32cdf0e10cSrcweirthe client.  The Java part of the client in turn uses the in-process JNI bridge
33cdf0e10cSrcweirto obtain the thread-local token.
34