blob: b78605af903a9d0924312d0dbad744641c30b031 [file] [log] [blame]
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.rmi.UnexpectedException;
import javax.rmi.CORBA.Stub;
import javax.rmi.CORBA.Util;
import org.omg.CORBA.SystemException;
import org.omg.CORBA.portable.ApplicationException;
import org.omg.CORBA.portable.OutputStream;
import org.omg.CORBA.portable.RemarshalException;
import org.omg.CORBA.portable.ServantObject;
/**
* ObjectStreamTest$Echo Stub class generated by rmic, do not edit.
*/
public class ObjectStreamTest$_Echo_Stub extends Stub implements ObjectStreamTest.Echo {
private static final String[] _type_ids = {
"RMI:ObjectStreamTest\\U0024Echo:0000000000000000"
};
private static final long serialVersionUID = 5217577841494640354L;
public String[] _ids() {
return _type_ids.clone();
}
public Object echo(Object arg0) throws java.rmi.RemoteException {
if (!Util.isLocal(this)) {
try {
org.omg.CORBA.portable.InputStream in = null;
try {
OutputStream out = _request("echo", true);
Util.writeAny(out,arg0);
in = _invoke(out);
return Util.readAny(in);
} catch (ApplicationException ex) {
in = ex.getInputStream();
String $_id = in.read_string();
throw new UnexpectedException($_id);
} catch (RemarshalException ex) {
return echo(arg0);
} finally {
_releaseReply(in);
}
} catch (SystemException ex) {
throw Util.mapSystemException(ex);
}
} else {
ServantObject so = _servant_preinvoke("echo",ObjectStreamTest.Echo.class);
if (so == null) {
return echo(arg0);
}
try {
Object arg0Copy = Util.copyObject(arg0,_orb());
Object result = ((ObjectStreamTest.Echo)so.servant).echo(arg0Copy);
return Util.copyObject(result,_orb());
} catch (Throwable ex) {
Throwable exCopy = (Throwable)Util.copyObject(ex,_orb());
throw Util.wrapException(exCopy);
} finally {
_servant_postinvoke(so);
}
}
}
}