jdk/test/sun/rmi/transport/tcp/blockAccept/TestImpl.java
author rriggs
Tue, 26 Apr 2016 21:25:18 -0400
changeset 37667 6d042f115c35
child 37681 b1a0f119f766
permissions -rw-r--r--
8155182: fix to JDK-8066750 broke jdk9 builds Summary: Restore RMI Http Proxy support for now Reviewed-by: darcy, lancea, smarks
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
37667
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
     1
/*
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
     2
 * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
     4
 *
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
     7
 * published by the Free Software Foundation.
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
     8
 *
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    13
 * accompanied this code).
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    14
 *
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    18
 *
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    21
 * questions.
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    22
 */
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    23
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    24
import java.rmi.*;
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    25
import java.rmi.server.*;
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    26
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    27
public class TestImpl
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    28
    extends Object
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    29
    implements TestIface
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    30
{
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    31
    public TestImpl() {
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    32
    }
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    33
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    34
    public TestIface export()
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    35
        throws RemoteException
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    36
    {
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    37
        return (TestIface)UnicastRemoteObject.exportObject(this);
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    38
    }
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    39
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    40
    public void unexport()
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    41
        throws NoSuchObjectException
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    42
    {
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    43
        UnicastRemoteObject.unexportObject(this, true);
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    44
    }
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    45
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    46
    public String testCall(String ign) {
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    47
        return ("OK");
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    48
    }
6d042f115c35 8155182: fix to JDK-8066750 broke jdk9 builds
rriggs
parents:
diff changeset
    49
}