【Java开源代码栏目提醒】:文章导读:在新的一年中,各位网友都进入紧张的学习或是工作阶段。网学会员整理了Java开源代码-_StringRegistryStub.java的相关内容供大家参考,祝大家在新的一年里工作和学习顺利!
package Registry;
/**
* Registry/_StringRegistryStub.java
* Generated by the IDL-to-Java compiler (portable), version "3.0"
* from registry.idl
* Sunday, October 1, 2000 7:10:58 PM PDT
*/
public class _StringRegistryStub extends org.omg.CORBA.portable.ObjectImpl implements Registry.StringRegistry
{
// Constructors
// NOTE: If the default constructor is used, the
// object is useless until _set_delegate (...)
// is called.
public _StringRegistryStub ()
{
super ();
}
public _StringRegistryStub (org.omg.CORBA.portable.Delegate delegate)
{
super ();
_set_delegate (delegate);
}
public String getValue (String key)
{
org.omg.CORBA.portable.InputStream _in = null;
try {
org.omg.CORBA.portable.OutputStream _out = _request ("getValue", true);
_out.write_string (key);
_in = _invoke (_out);
String __result = _in.read_string ();
return __result;
} catch (org.omg.CORBA.portable.ApplicationException _ex) {
_in = _ex.getInputStream ();
String _id = _ex.getId ();
throw new org.omg.CORBA.MARSHAL (_id);
} catch (org.omg.CORBA.portable.RemarshalException _rm) {
return getValue (key);
} finally {
_releaseReply (_in);
}
} // getValue
public void setValue (String key, String value)
{
org.omg.CORBA.portable.InputStream _in = null;
try {
org.omg.CORBA.portable.OutputStream _out = _request ("setValue", true);
_out.write_string (key);
_out.write_string (value);
_in = _invoke (_out);
} catch (org.omg.CORBA.portable.ApplicationException _ex) {
_in = _ex.getInputStream ();
String _id = _ex.getId ();
throw new org.omg.CORBA.MARSHAL (_id);
} catch (org.omg.CORBA.portable.RemarshalException _rm) {
setValue (key, value);
} finally {
_releaseReply (_in);
}
} // setValue
public void removeValueForKey (String key)
{
org.omg.CORBA.portable.InputStream _in = null;
try {
org.omg.CORBA.portable.OutputStream _out = _request ("removeValueForKey", true);
_out.write_string (key);
_in = _invoke (_out);
} catch (org.omg.CORBA.portable.ApplicationException _ex) {
_in = _ex.getInputStream ();
String _id = _ex.getId ();
throw new org.omg.CORBA.MARSHAL (_id);
} catch (org.omg.CORBA.portable.RemarshalException _rm) {
removeValueForKey (key);
} finally {
_releaseReply (_in);
}
} // removeValueForKey
public void registerWatcher (Registry.StringRegistryWatcher watcher)
{
org.omg.CORBA.portable.InputStream _in = null;
try {
org.omg.CORBA.portable.OutputStream _out = _request ("registerWatcher", true);
Registry.StringRegistryWatcherHelper.write (_out, watcher);
_in = _invoke (_out);
} catch (org.omg.CORBA.portable.ApplicationException _ex) {
_in = _ex.getInputStream ();
String _id = _ex.getId ();
throw new org.omg.CORBA.MARSHAL (_id);
} catch (org.omg.CORBA.portable.RemarshalException _rm) {
registerWatcher (watcher);
} finally {
_releaseReply (_in);
}
} // registerWatcher
public void unregisterWatcher (Registry.StringRegistryWatcher watcher)
{
org.omg.CORBA.portable.InputStream _in = null;
try {
org.omg.CORBA.portable.OutputStream _out = _request ("unregisterWatcher", true);
Registry.StringRegistryWatcherHelper.write (_out, watcher);
_in = _invoke (_out);
} catch (org.omg.CORBA.portable.ApplicationException _ex) {
_in = _ex.getInputStream ();
String _id = _ex.getId ();
throw new org.omg.CORBA.MARSHAL (_id);
} catch (org.omg.CORBA.portable.RemarshalException _rm) {
unregisterWatcher (watcher);
} finally {
_releaseReply (_in);
}
} // unregisterWatcher
// Type-specific CORBA::Object operations
private static String[] __ids = {
"IDL:Registry/StringRegistry:1.0"};
public String[