HomeDigital EditionSys-Con RadioSearch Java Cd
Advanced Java AWT Book Reviews/Excerpts Client Server Corba Editorials Embedded Java Enterprise Java IDE's Industry Watch Integration Interviews Java Applet Java & Databases Java & Web Services Java Fundamentals Java Native Interface Java Servlets Java Beans J2ME Libraries .NET Object Orientation Observations/IMHO Product Reviews Scalability & Performance Security Server Side Source Code Straight Talking Swing Threads Using Java with others Wireless XML
 

"Reinventing TCP Based Internet Protocols in CORBA"
Vol. 3, Issue 2, p. 48

	

Listing 1.
 
Redefinition of IRC in OMG IDL 

module CORBAirc { 

exception NickCollision {}; 
exception NickNotFound {}; 
exception ChannelNotFound {}; 

typedef sequence<string> StringSeq; 

enum UserMode { SPECTATOR, PARTICIPANT, HOST }; 

interface UserSession { 
  readonly attribute string nick; 
  readonly attribute string realname; 

  boolean join (in string channel); 
  boolean part (in string channel); 
  StringSeq get_channel_users (in string channel); 
  UserMode get_my_usermode (in string channel) 
    raises (ChannelNotFound, NickNotFound); 
  UserMode get_usermode (in string channel, 
    in string nick 
  ) raises (NickNotFound, ChannelNotFound); 
  boolean set_moderated (in string channel, 
    in boolean moderated); 
  boolean set_topic_anyone (in string channel, 
    in boolean STA); 
  boolean set_topic (in string channel, 
    in string newTopic); 
  boolean set_usermode (in string channel, 
    in string nick, in UserMode mode); 
  void send_msg (in string channel, 
    in string msg); 
  void whisper (in string nick, 
    in string msg); 
  void quit(); 
}; 

interface UserNotifier { 
  void msg (in string channel, 
    in string sender, in string msg); 
  void whisper (in string sender, in string msg); 
  void new_user (in string channel, in string nick); 
  void user_left (in string channel, in string nick); 
  void usermode_changed (in string channel, 
    in string nick, in UserMode newMode); 
  void ping(); 
}; 

interface Ircd { 
  UserSession login(in string nick, 
    in string realName, 
    inout UserNotifier notifier 
  ) raises (NickCollision); 

  StringSeq list_channels(); 
  string get_realname (in string nick) 
    raises (NickNotFound); 
  string get_topic (in string channel) 
    raises (ChannelNotFound); 
  void get_channel_info (in string channel, 
    out boolean moderated, 
    out boolean setTopicAnyone 
  ) raises (ChannelNotFound); 
}; 

};
 
    
 

All Rights Reserved
Copyright ©  2004 SYS-CON Media, Inc.
  E-mail: [email protected]

Java and Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. SYS-CON Publications, Inc. is independent of Sun Microsystems, Inc.