📄 _messagecenterstub.java
字号:
/**
* _MssageCenterStub.java .
* 由 IDL-to-Java 编译器(可移植),版本 "3.2" 生成
* 来自 MessageCenter.idl
* 2008年5月21日 星期三 下午11时23分32秒 CST
*/
public class _MessageCenterStub extends org.omg.CORBA.portable.ObjectImpl implements MessageCenter
{
public void register (String username, String password)
{
org.omg.CORBA.portable.InputStream $in = null;
try {
org.omg.CORBA.portable.OutputStream $out = _request ("register", true);
$out.write_string (username);
$out.write_string (password);
$in = _invoke ($out);
return;
} 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) {
register (username, password );
} finally {
_releaseReply ($in);
}
} // register
public void showUsers ()
{
org.omg.CORBA.portable.InputStream $in = null;
try {
org.omg.CORBA.portable.OutputStream $out = _request ("showUsers", true);
$in = _invoke ($out);
return;
} 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) {
showUsers ( );
} finally {
_releaseReply ($in);
}
} // showUsers
public void checkMessages (String username, String password)
{
org.omg.CORBA.portable.InputStream $in = null;
try {
org.omg.CORBA.portable.OutputStream $out = _request ("checkMessages", true);
$out.write_string (username);
$out.write_string (password);
$in = _invoke ($out);
return;
} 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) {
checkMessages (username, password );
} finally {
_releaseReply ($in);
}
} // checkMessages
public void leaveMessage (String userName, String recieverName, String messageText)
{
org.omg.CORBA.portable.InputStream $in = null;
try {
org.omg.CORBA.portable.OutputStream $out = _request ("leaveMessage", true);
$out.write_string (userName);
$out.write_string (recieverName);
$out.write_string (messageText);
$in = _invoke ($out);
return;
} 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) {
leaveMessage (userName, recieverName, messageText );
} finally {
_releaseReply ($in);
}
} // leaveMessage
// Type-specific CORBA::Object operations
private static String[] __ids = {
"IDL:MessageCenter/MessageCenter:1.0"};
public String[] _ids ()
{
return (String[])__ids.clone ();
}
private void readObject (java.io.ObjectInputStream s) throws java.io.IOException
{
String str = s.readUTF ();
String[] args = null;
java.util.Properties props = null;
org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str);
org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();
_set_delegate (delegate);
}
private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException
{
String[] args = null;
java.util.Properties props = null;
String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);
s.writeUTF (str);
}
} // class _MessageCenterStub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -