_ClientListenerStub.java
资源名称:chat.zip [点击查看]
上传用户:annion2008
上传日期:2021-03-11
资源大小:38k
文件大小:4k
源码类别:
中间件编程
开发平台:
Java
- package chat.cliente;
- /**
- * chat/cliente/_ClientListenerStub.java .
- * 由 IDL-to-Java 编译器(可移植),版本 "3.2" 生成
- * 来自 ChatServide.idl
- * 2010年4月12日 星期一 下午06时04分51秒 CST
- */
- public class _ClientListenerStub extends org.omg.CORBA.portable.ObjectImpl implements chat.cliente.ClientListener
- {
- public void addApelido (String apelido)
- {
- org.omg.CORBA.portable.InputStream $in = null;
- try {
- org.omg.CORBA.portable.OutputStream $out = _request ("addApelido", true);
- $out.write_string (apelido);
- $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) {
- addApelido (apelido );
- } finally {
- _releaseReply ($in);
- }
- } // addApelido
- public void delApelido (String apelido)
- {
- org.omg.CORBA.portable.InputStream $in = null;
- try {
- org.omg.CORBA.portable.OutputStream $out = _request ("delApelido", true);
- $out.write_string (apelido);
- $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) {
- delApelido (apelido );
- } finally {
- _releaseReply ($in);
- }
- } // delApelido
- public void recebeMensagem (chat.Mensagem msg)
- {
- org.omg.CORBA.portable.InputStream $in = null;
- try {
- org.omg.CORBA.portable.OutputStream $out = _request ("recebeMensagem", true);
- chat.MensagemHelper.write ($out, msg);
- $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) {
- recebeMensagem (msg );
- } finally {
- _releaseReply ($in);
- }
- } // recebeMensagem
- // Type-specific CORBA::Object operations
- private static String[] __ids = {
- "IDL:chat/cliente/ClientListener: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.ORB orb = org.omg.CORBA.ORB.init (args, props);
- try {
- org.omg.CORBA.Object obj = orb.string_to_object (str);
- org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();
- _set_delegate (delegate);
- } finally {
- orb.destroy() ;
- }
- }
- private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException
- {
- String[] args = null;
- java.util.Properties props = null;
- org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init (args, props);
- try {
- String str = orb.object_to_string (this);
- s.writeUTF (str);
- } finally {
- orb.destroy() ;
- }
- }
- } // class _ClientListenerStub