Back to index

im-sdk  12.3.91
Public Member Functions | Static Public Member Functions | Static Public Attributes | Package Functions | Static Package Functions | Static Package Attributes | Private Member Functions | Private Attributes | Static Private Attributes
sun.awt.im.iiimp.AuxProxy Class Reference
Inheritance diagram for sun.awt.im.iiimp.AuxProxy:
Inheritance graph
[legend]
Collaboration diagram for sun.awt.im.iiimp.AuxProxy:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void run ()
void dispatchAuxEvent (IIIMAuxEvent e)
void run ()
void dispatchAuxEvent (IIIMAuxEvent e)

Static Public Member Functions

static void main (String[] args)
static ODClassLoader getLoader ()
static void main (String[] args)
static ODClassLoader getLoader ()

Static Public Attributes

static final int VERSION = 1
static final int FOURBYTES_PACKET = 0
static final int EIGHTBYTES_PACKET = 1
static final int IM_NO_PROTOCOL = 0
static final int IM_CONNECT = 1
static final int IM_CONNECT_REPLY = 2
static final int IM_DISCONNECT = 3
static final int IM_DISCONNECT_REPLY = 4
static final int IM_REGISTER_TRIGGER_KEYS = 5
static final int IM_TRIGGER_NOTIFY = 6
static final int IM_TRIGGER_NOTIFY_REPLY = 7
static final int IM_SETIMVALUES = 8
static final int IM_SETIMVALUES_REPLY = 9
static final int IM_GETIMVALUES = 10
static final int IM_GETIMVALUES_REPLY = 11
static final int IM_FORWARD_EVENT = 12
static final int IM_FORWARD_EVENT_REPLY = 13
static final int IM_COMMIT_STRING = 14
static final int IM_FORWARD_EVENT_WITH_OPERATIONS = 15
static final int IM_FORWARD_EVENT_WITH_OPERATIONS_REPLY = 16
static final int IM_CREATEIC = 20
static final int IM_CREATEIC_REPLY = 21
static final int IM_DESTROYIC = 22
static final int IM_DESTROYIC_REPLY = 23
static final int IM_SETICVALUES = 24
static final int IM_SETICVALUES_REPLY = 25
static final int IM_GETICVALUES = 26
static final int IM_GETICVALUES_REPLY = 27
static final int IM_SETICFOCUS = 28
static final int IM_SETICFOCUS_REPLY = 29
static final int IM_UNSETICFOCUS = 30
static final int IM_UNSETICFOCUS_REPLY = 31
static final int IM_RESETIC = 32
static final int IM_RESETIC_REPLY = 33
static final int IM_PREEDIT_START = 40
static final int IM_PREEDIT_START_REPLY = 41
static final int IM_PREEDIT_DRAW = 42
static final int IM_PREEDIT_DRAW_REPLY = 43
static final int IM_PREEDIT_DONE = 46
static final int IM_PREEDIT_DONE_REPLY = 47
static final int IM_STATUS_START = 50
static final int IM_STATUS_START_REPLY = 51
static final int IM_STATUS_DRAW = 52
static final int IM_STATUS_DRAW_REPLY = 53
static final int IM_STATUS_DONE = 54
static final int IM_STATUS_DONE_REPLY = 55
static final int IM_LOOKUP_CHOICE_START = 70
static final int IM_LOOKUP_CHOICE_START_REPLY = 71
static final int IM_LOOKUP_CHOICE_DRAW = 72
static final int IM_LOOKUP_CHOICE_DRAW_REPLY = 73
static final int IM_LOOKUP_CHOICE_DONE = 74
static final int IM_LOOKUP_CHOICE_DONE_REPLY = 75
static final int IM_LOOKUP_CHOICE_PROCESS = 76
static final int IM_LOOKUP_CHOICE_PROCESS_REPLY = 77
static final int IM_AUX_START = 90
static final int IM_AUX_START_REPLY = 91
static final int IM_AUX_DRAW = 92
static final int IM_AUX_DRAW_REPLY = 93
static final int IM_AUX_DONE = 94
static final int IM_AUX_DONE_REPLY = 95
static final int IM_AUX_SETVALUES = 96
static final int IM_AUX_SETVALUES_REPLY = 97
static final int BIGENDIAN = 0x42
static final int LITTLEENDIAN = 0x6c
static final int LOOKUP_MAX_NUMBER = 1
static final int LOOKUP_STYLE = 2
static final int QUERY_LOOKUP_STYLE = 3
static final int INPUT_LANGUAGE = 4
static final int PRIMARY_LANGUAGE = 5
static final int STRING = 0
static final int TEXT = 1
static final int KEYEVENT = 2
static final int INPUTMETHOD_LIST = 0x1001
static final int OBJECT_DESCRIPTER_LIST = 0x1010
static final int CLIENT_DESCRIPTER = 0x1011
static final int CCDEF = 0x1030
static final int GUI_OBJECT = 0x1031
static final int LWE_OBJECT = 0x1032
static final int IC_INPUT_LANGUAGE = 1
static final int IC_CHARACTER_SUBSETS = 2
static final int IC_INPUT_METHOD = 3
static final int NOID = -1
static final int GUI_CATEGORY = 0
static final int LWE_CATEGORY = 1
static final int SYNTAX_RULE_CATEGORY = 2
static final int MANAGE_RULE_CATEGORY = 3
static final int DECORATION_FEEDBACK = 0
static final int FOREGROUND_RGB_FEEDBACK = 1
static final int BACKGROUND_RGB_FEEDBACK = 2
static final int UNDERLINE_RGB_FEEDBACK = 3
static final int INPUT_STRING = 0
static final int READING = 1
static final int PART_OF_SPEECH = 2
static final int CLAUSE = 3
static final int IM_OPEN_NS = 80
static final int IM_OPEN_NS_REPLY = 81

Package Functions

void setClientType ()
 This will receive object donwloading candidate before get IM_SETVALUES_REPLY.
void downloadObject ()
void createPseudoIC ()
void getReply (int protocolID) throws IOException
void setClientType ()
 This will receive object donwloading candidate before get IM_SETVALUES_REPLY.
void downloadObject ()
void createPseudoIC ()
void getReply (int protocolID) throws IOException

Static Package Functions

 [static initializer]
 [static initializer]

Static Package Attributes

static final String CLIENT_TYPE = "JavaAuxProxy"

Private Member Functions

void imConnect () throws IOException
void driveProtocol (Protocol protocol) throws IOException
synchronized void send (Protocol protocol) throws IOException
void debug (String str)
void imConnect () throws IOException
void driveProtocol (Protocol protocol) throws IOException
synchronized void send (Protocol protocol) throws IOException
void debug (String str)

Private Attributes

IIIMPInputStream in
IIIMPOutputStream out
String hostName
int imID
int icID
HashSet doSet
HashMap auxMap
IIIMPURLConnection uc

Static Private Attributes

static ODClassLoader odLoader
static final String IIIMP_PKG_PREFIX = "sun.awt.im"
static final String JAVA_PROTOCOL_HANDLER_PKGS = "java.protocol.handler.pkgs"

Detailed Description

Definition at line 53 of file AuxProxy.java.


Member Function Documentation

sun.awt.im.iiimp.AuxProxy.[static initializer] ( ) [inline, static, package]
sun.awt.im.iiimp.AuxProxy.[static initializer] ( ) [inline, static, package]
void sun.awt.im.iiimp.AuxProxy.createPseudoIC ( ) [inline, package]

Definition at line 227 of file AuxProxy.java.

                          {
       try {
           send(new Protocol(IM_CREATEIC, ProtocolDriver.getCreateICData(imID)));
           getReply(IM_CREATEIC_REPLY);
       } catch(Exception e) {
           if (Manager.DEBUG) {
              e.printStackTrace();
           }
       }
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.AuxProxy.createPseudoIC ( ) [inline, package]

Definition at line 227 of file AuxProxy.java.

                          {
       try {
           send(new Protocol(IM_CREATEIC, ProtocolDriver.getCreateICData(imID)));
           getReply(IM_CREATEIC_REPLY);
       } catch(Exception e) {
           if (Manager.DEBUG) {
              e.printStackTrace();
           }
       }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void sun.awt.im.iiimp.AuxProxy.debug ( String  str) [inline, private]

Definition at line 471 of file AuxProxy.java.

                                   {
       if (Manager.DEBUG) {
           System.err.println(str);
       }
    }
void sun.awt.im.iiimp.AuxProxy.debug ( String  str) [inline, private]

Definition at line 471 of file AuxProxy.java.

                                   {
       if (Manager.DEBUG) {
           System.err.println(str);
       }
    }

Here is the caller graph for this function:

void sun.awt.im.iiimp.AuxProxy.dispatchAuxEvent ( IIIMAuxEvent  e) [inline]

Definition at line 191 of file AuxProxy.java.

                                                 {
       int[] idata;
       String[] sdata; 
       try {
           ProtocolData data = new ProtocolData();

           data.write2(imID);
           data.write2(icID);
           data.write4(e.getIndex());
           data.writeString(e.getName());
           if ((idata = e.getIntValues()) == null) {
              data.write4(0);
           } else {
              data.write4(idata.length * 4);
              for (int i = 0; i < idata.length; i++) {
                  data.write4(idata[i]);
              }
           }
           if ((sdata = e.getStringValues())== null) {
              data.write4(0);
           } else {
              ProtocolData d = new ProtocolData();
              for (int i = 0; i < sdata.length; i++) {
                  d.writeString(sdata[i]);
              }
              data.write4(d.count);
              data.writeBytes(d.buf, d.count);
           }
           send(new Protocol(IM_AUX_SETVALUES, data));
       } catch(Exception ex) {
           if (Manager.DEBUG) {
              ex.printStackTrace();
           }
       }
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.AuxProxy.dispatchAuxEvent ( IIIMAuxEvent  e) [inline]

Definition at line 191 of file AuxProxy.java.

                                                 {
       int[] idata;
       String[] sdata; 
       try {
           ProtocolData data = new ProtocolData();

           data.write2(imID);
           data.write2(icID);
           data.write4(e.getIndex());
           data.writeString(e.getName());
           if ((idata = e.getIntValues()) == null) {
              data.write4(0);
           } else {
              data.write4(idata.length * 4);
              for (int i = 0; i < idata.length; i++) {
                  data.write4(idata[i]);
              }
           }
           if ((sdata = e.getStringValues())== null) {
              data.write4(0);
           } else {
              ProtocolData d = new ProtocolData();
              for (int i = 0; i < sdata.length; i++) {
                  d.writeString(sdata[i]);
              }
              data.write4(d.count);
              data.writeBytes(d.buf, d.count);
           }
           send(new Protocol(IM_AUX_SETVALUES, data));
       } catch(Exception ex) {
           if (Manager.DEBUG) {
              ex.printStackTrace();
           }
       }
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.AuxProxy.downloadObject ( ) [inline, package]

Definition at line 163 of file AuxProxy.java.

                          {
       if (doSet.size() == 0) {
           return;
       }
       try {
           ProtocolData data = new ProtocolData();
           data.write2(imID);
           data.write2(0); // pad
           data.write4(doSet.size() * 2);

           Iterator it = doSet.iterator();
           while(it.hasNext()) { 
              IIIMPObjectDescripter desc =
                  (IIIMPObjectDescripter)it.next();
              data.write2(desc.getDAttribID());
              debug(desc.toString());
           }
              
           data.pad();
           send(new Protocol(IM_GETIMVALUES, data));
           getReply(IM_GETIMVALUES_REPLY);
       } catch(Exception e) {
           if (Manager.DEBUG) {
              e.printStackTrace();
           }
       }
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.AuxProxy.downloadObject ( ) [inline, package]

Definition at line 163 of file AuxProxy.java.

                          {
       if (doSet.size() == 0) {
           return;
       }
       try {
           ProtocolData data = new ProtocolData();
           data.write2(imID);
           data.write2(0); // pad
           data.write4(doSet.size() * 2);

           Iterator it = doSet.iterator();
           while(it.hasNext()) { 
              IIIMPObjectDescripter desc =
                  (IIIMPObjectDescripter)it.next();
              data.write2(desc.getDAttribID());
              debug(desc.toString());
           }
              
           data.pad();
           send(new Protocol(IM_GETIMVALUES, data));
           getReply(IM_GETIMVALUES_REPLY);
       } catch(Exception e) {
           if (Manager.DEBUG) {
              e.printStackTrace();
           }
       }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void sun.awt.im.iiimp.AuxProxy.driveProtocol ( Protocol  protocol) throws IOException [inline, private]

Definition at line 250 of file AuxProxy.java.

                                                                     {
       int opcode = protocol.getOpCode();
       ProtocolData data = protocol.getData();
       ProtocolData replyData = new ProtocolData();

       imID = data.read2();
       switch(opcode) {
         case IM_SETIMVALUES:
           data.read2(); // pad
           int length = data.read4();

           if (length > 0) {
              while(data.available() > 0) {
                  int type = data.read2();
                  data.read2(); // pad
                  int size = data.read4();
                  byte[] buf = new byte[size];
                  data.read(buf, 0, size);
                  ProtocolData adata = new ProtocolData(buf);
                  switch(type) {
                    case INPUTMETHOD_LIST:
                     debug(" im list");
                     break;
                    case OBJECT_DESCRIPTER_LIST:
                     debug(" obj desc list");
                     while(adata.available() > 0) {
                         int objCategory = adata.read2();
                         adata.read2(); // pad
                         int objSize = adata.read4();
                         int attribID = adata.read2();
                         int dattribID = adata.read2();
                         String objName = adata.readString();
                         String objHRN = adata.readString();
                         String objSignature = adata.readString();
                         String objUser = adata.readString();
                         IIIMPObjectDescripter objDesc =
                            new IIIMPObjectDescripter(objCategory,
                                                   objSize,
                                                   attribID,
                                                   dattribID,
                                                   objName,
                                                   objHRN,
                                                   objSignature,
                                                   objUser);
                         doSet.add(objDesc);
                     }
                     break;
                    case CCDEF:
                     debug(" ccdef");
                     break;
                    case GUI_OBJECT:
                     debug(" gui obj");
                     break;
                    case LWE_OBJECT:
                     debug(" lwe obj");
                     break;
                    default:
                     debug(" unknown");
                     break;
                  }
              }
           }
           replyData.write2(imID);
           replyData.write2(0); // pad
           send(new Protocol(IM_SETIMVALUES_REPLY, replyData));
           break;
         case IM_SETIMVALUES_REPLY:
           break;
         case IM_GETIMVALUES_REPLY:
           data.read2(); // pad
           data.read4(); // size, not used

           while(data.available() > 7) {
              debug(" available = " + data.available());
              int attrID = data.read2();
              debug(" attrID = " + attrID);
              data.read2(); // pad
              int size = data.read4();
              debug(" attrsize = " + size);
              if (size > 0) {
                  int classNameListSize = data.read4();
                  debug(" cnls = " + classNameListSize);
                  ProtocolData classNameData =
                     new ProtocolData(data.buf, data.pos, classNameListSize);
                  data.skipBytes(classNameListSize);
                  while(classNameData.available() > 0) {
                     String className = classNameData.readString();
                     debug(" class = " + className);
                  }
                  int jarSize = data.read4();
                  debug(" jar size = " + jarSize);
                  byte[] attrval = new byte[jarSize];
                  data.read(attrval, 0, jarSize);

                  JarInputStream jis =
                     new JarInputStream(new ByteArrayInputStream(attrval));
                  
                  odLoader.addJar(jis);
                  
                  int pad = ProtocolData.paddings(size);
                  debug(" paddings = " + pad);
                  for (int i = 0; i < pad; i++) {
                     data.read();
                  }
              }
           }
           break;
         case IM_REGISTER_TRIGGER_KEYS:
           break;
         case IM_CONNECT_REPLY:
           int langLen = data.read2();
           debug(" langLen = " + langLen);
           while(data.available() > 0) {
              debug(" lang = " + data.readString());
           }
           setClientType();
           downloadObject();
           createPseudoIC();
           break;
         case IM_CREATEIC_REPLY:
           icID = data.read2();
           debug(" CREATEIC_REPLY icID = " + icID);
           ProtocolData d = new ProtocolData();
           d.write2(imID);
           d.write2(icID);
           send(new Protocol(IM_SETICFOCUS, d));
           getReply(IM_SETICFOCUS_REPLY);
           break;
         case IM_AUX_START: {
             icID = data.read2();
             
             int index = data.read4();
             String name = data.readString();
             debug(" AUX START by PROXY - " + name);
             
             try {
                IIIMAuxListener aux =
                    (IIIMAuxListener)odLoader.loadClass(name).newInstance();
                auxMap.put(name, aux);
                ((IIIMComponent)aux).setProxy(this);
                aux.auxStart(new IIIMAuxEvent(IIIMAuxEvent.START,
                                          index, name));
             } catch(Exception e) {
                if (Manager.DEBUG) {
                    e.printStackTrace();
                }
             }

             replyData.write2(imID);
             replyData.write2(icID);
             replyData.write4(index);
             replyData.writeString(name);
             send(new Protocol(IM_AUX_START_REPLY, replyData));
             break;
         }
         case IM_AUX_DRAW: {
             icID = data.read2(); // ic
             int index = data.read4(); // aux index
             String name = data.readString();
             int intSize = data.read4();
             int[] intA = new int[intSize / 4];
             for (int i = 0; i < intA.length; i++) {
                intA[i] = data.read4();
             }
             int strSize = data.read4();
             Vector v = new Vector();
             while(data.available() > 0) {
                v.add(data.readString());
             }
             String[] strA = new String[v.size()];
             for (int i = 0; i < v.size(); i++) {
                strA[i] = (String)v.elementAt(i);
             }
             
             IIIMAuxListener aux = (IIIMAuxListener)auxMap.get(name); 
             if (aux == null) {
                debug(" Unknown aux : " + name);
                break;
             }
             
             debug(" aux draw.");

             aux.auxDraw(new IIIMAuxEvent(IIIMAuxEvent.DRAW,
                                      index, name, intA, strA));
             replyData.write2(imID);
             replyData.write2(icID);
             replyData.write4(index);
             replyData.writeString(name);
             send(new Protocol(IM_AUX_DRAW_REPLY, replyData));
             break;
         }
         case IM_AUX_DONE:
           icID = data.read2();
           int index = data.read4();
           String name = data.readString();
           IIIMAuxListener aux = (IIIMAuxListener)auxMap.get(name);
           if (aux == null) {
              debug(" Unknown aux : " + name);
              break;
           }
           aux.auxDone(new IIIMAuxEvent(IIIMAuxEvent.DONE, index, name));
           replyData.write2(imID);
           replyData.write2(icID);
           replyData.write4(index);
           replyData.writeString(name);
           send(new Protocol(IM_AUX_DONE_REPLY, replyData));
           break;
         case IM_AUX_SETVALUES_REPLY:
           break;
         case IM_SETICFOCUS_REPLY:
           break;
         default:
           debug("AuxProxy does not intend to receive " + protocol);
       }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void sun.awt.im.iiimp.AuxProxy.driveProtocol ( Protocol  protocol) throws IOException [inline, private]

Definition at line 250 of file AuxProxy.java.

                                                                     {
       int opcode = protocol.getOpCode();
       ProtocolData data = protocol.getData();
       ProtocolData replyData = new ProtocolData();

       imID = data.read2();
       switch(opcode) {
         case IM_SETIMVALUES:
           data.read2(); // pad
           int length = data.read4();

           if (length > 0) {
              while(data.available() > 0) {
                  int type = data.read2();
                  data.read2(); // pad
                  int size = data.read4();
                  byte[] buf = new byte[size];
                  data.read(buf, 0, size);
                  ProtocolData adata = new ProtocolData(buf);
                  switch(type) {
                    case INPUTMETHOD_LIST:
                     debug(" im list");
                     break;
                    case OBJECT_DESCRIPTER_LIST:
                     debug(" obj desc list");
                     while(adata.available() > 0) {
                         int objCategory = adata.read2();
                         adata.read2(); // pad
                         int objSize = adata.read4();
                         int attribID = adata.read2();
                         int dattribID = adata.read2();
                         String objName = adata.readString();
                         String objHRN = adata.readString();
                         String objSignature = adata.readString();
                         String objUser = adata.readString();
                         IIIMPObjectDescripter objDesc =
                            new IIIMPObjectDescripter(objCategory,
                                                   objSize,
                                                   attribID,
                                                   dattribID,
                                                   objName,
                                                   objHRN,
                                                   objSignature,
                                                   objUser);
                         doSet.add(objDesc);
                     }
                     break;
                    case CCDEF:
                     debug(" ccdef");
                     break;
                    case GUI_OBJECT:
                     debug(" gui obj");
                     break;
                    case LWE_OBJECT:
                     debug(" lwe obj");
                     break;
                    default:
                     debug(" unknown");
                     break;
                  }
              }
           }
           replyData.write2(imID);
           replyData.write2(0); // pad
           send(new Protocol(IM_SETIMVALUES_REPLY, replyData));
           break;
         case IM_SETIMVALUES_REPLY:
           break;
         case IM_GETIMVALUES_REPLY:
           data.read2(); // pad
           data.read4(); // size, not used

           while(data.available() > 7) {
              debug(" available = " + data.available());
              int attrID = data.read2();
              debug(" attrID = " + attrID);
              data.read2(); // pad
              int size = data.read4();
              debug(" attrsize = " + size);
              if (size > 0) {
                  int classNameListSize = data.read4();
                  debug(" cnls = " + classNameListSize);
                  ProtocolData classNameData =
                     new ProtocolData(data.buf, data.pos, classNameListSize);
                  data.skipBytes(classNameListSize);
                  while(classNameData.available() > 0) {
                     String className = classNameData.readString();
                     debug(" class = " + className);
                  }
                  int jarSize = data.read4();
                  debug(" jar size = " + jarSize);
                  byte[] attrval = new byte[jarSize];
                  data.read(attrval, 0, jarSize);

                  JarInputStream jis =
                     new JarInputStream(new ByteArrayInputStream(attrval));
                  
                  odLoader.addJar(jis);
                  
                  int pad = ProtocolData.paddings(size);
                  debug(" paddings = " + pad);
                  for (int i = 0; i < pad; i++) {
                     data.read();
                  }
              }
           }
           break;
         case IM_REGISTER_TRIGGER_KEYS:
           break;
         case IM_CONNECT_REPLY:
           int langLen = data.read2();
           debug(" langLen = " + langLen);
           while(data.available() > 0) {
              debug(" lang = " + data.readString());
           }
           setClientType();
           downloadObject();
           createPseudoIC();
           break;
         case IM_CREATEIC_REPLY:
           icID = data.read2();
           debug(" CREATEIC_REPLY icID = " + icID);
           ProtocolData d = new ProtocolData();
           d.write2(imID);
           d.write2(icID);
           send(new Protocol(IM_SETICFOCUS, d));
           getReply(IM_SETICFOCUS_REPLY);
           break;
         case IM_AUX_START: {
             icID = data.read2();
             
             int index = data.read4();
             String name = data.readString();
             debug(" AUX START by PROXY - " + name);
             
             try {
                IIIMAuxListener aux =
                    (IIIMAuxListener)odLoader.loadClass(name).newInstance();
                auxMap.put(name, aux);
                ((IIIMComponent)aux).setProxy(this);
                aux.auxStart(new IIIMAuxEvent(IIIMAuxEvent.START,
                                          index, name));
             } catch(Exception e) {
                if (Manager.DEBUG) {
                    e.printStackTrace();
                }
             }

             replyData.write2(imID);
             replyData.write2(icID);
             replyData.write4(index);
             replyData.writeString(name);
             send(new Protocol(IM_AUX_START_REPLY, replyData));
             break;
         }
         case IM_AUX_DRAW: {
             icID = data.read2(); // ic
             int index = data.read4(); // aux index
             String name = data.readString();
             int intSize = data.read4();
             int[] intA = new int[intSize / 4];
             for (int i = 0; i < intA.length; i++) {
                intA[i] = data.read4();
             }
             int strSize = data.read4();
             Vector v = new Vector();
             while(data.available() > 0) {
                v.add(data.readString());
             }
             String[] strA = new String[v.size()];
             for (int i = 0; i < v.size(); i++) {
                strA[i] = (String)v.elementAt(i);
             }
             
             IIIMAuxListener aux = (IIIMAuxListener)auxMap.get(name); 
             if (aux == null) {
                debug(" Unknown aux : " + name);
                break;
             }
             
             debug(" aux draw.");

             aux.auxDraw(new IIIMAuxEvent(IIIMAuxEvent.DRAW,
                                      index, name, intA, strA));
             replyData.write2(imID);
             replyData.write2(icID);
             replyData.write4(index);
             replyData.writeString(name);
             send(new Protocol(IM_AUX_DRAW_REPLY, replyData));
             break;
         }
         case IM_AUX_DONE:
           icID = data.read2();
           int index = data.read4();
           String name = data.readString();
           IIIMAuxListener aux = (IIIMAuxListener)auxMap.get(name);
           if (aux == null) {
              debug(" Unknown aux : " + name);
              break;
           }
           aux.auxDone(new IIIMAuxEvent(IIIMAuxEvent.DONE, index, name));
           replyData.write2(imID);
           replyData.write2(icID);
           replyData.write4(index);
           replyData.writeString(name);
           send(new Protocol(IM_AUX_DONE_REPLY, replyData));
           break;
         case IM_AUX_SETVALUES_REPLY:
           break;
         case IM_SETICFOCUS_REPLY:
           break;
         default:
           debug("AuxProxy does not intend to receive " + protocol);
       }
    }

Here is the call graph for this function:

Definition at line 123 of file AuxProxy.java.

                                            {
       return odLoader;
    }

Definition at line 123 of file AuxProxy.java.

                                            {
       return odLoader;
    }
void sun.awt.im.iiimp.AuxProxy.getReply ( int  protocolID) throws IOException [inline, package]

Definition at line 238 of file AuxProxy.java.

                                                     {
       try {
           Protocol protocol = new Protocol();
           protocol.read(in);
           driveProtocol(protocol);
       } catch(Exception e) {
           if (Manager.DEBUG) {
              e.printStackTrace();
           }
       }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void sun.awt.im.iiimp.AuxProxy.getReply ( int  protocolID) throws IOException [inline, package]

Definition at line 238 of file AuxProxy.java.

                                                     {
       try {
           Protocol protocol = new Protocol();
           protocol.read(in);
           driveProtocol(protocol);
       } catch(Exception e) {
           if (Manager.DEBUG) {
              e.printStackTrace();
           }
       }
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.AuxProxy.imConnect ( ) throws IOException [inline, private]

Definition at line 127 of file AuxProxy.java.

                                                {
       String userName = System.getProperty("user.name", null);
       userName += "@" + hostName;
       ProtocolData data = new ProtocolData();
       data.write(BIGENDIAN);
       data.write(VERSION);
       data.writeString(userName);
       data.write2(0);
       send(new Protocol(IM_CONNECT, data));
       getReply(IM_CONNECT_REPLY);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void sun.awt.im.iiimp.AuxProxy.imConnect ( ) throws IOException [inline, private]

Definition at line 127 of file AuxProxy.java.

                                                {
       String userName = System.getProperty("user.name", null);
       userName += "@" + hostName;
       ProtocolData data = new ProtocolData();
       data.write(BIGENDIAN);
       data.write(VERSION);
       data.writeString(userName);
       data.write2(0);
       send(new Protocol(IM_CONNECT, data));
       getReply(IM_CONNECT_REPLY);
    }

Here is the call graph for this function:

static void sun.awt.im.iiimp.AuxProxy.main ( String[]  args) [inline, static]

Definition at line 55 of file AuxProxy.java.

                                           {
       SecurityManager sm = new SecurityManager();
       System.setSecurityManager(sm);
       AuxProxy t = new AuxProxy();
       t.start();
    }
static void sun.awt.im.iiimp.AuxProxy.main ( String[]  args) [inline, static]

Definition at line 55 of file AuxProxy.java.

                                           {
       SecurityManager sm = new SecurityManager();
       System.setSecurityManager(sm);
       AuxProxy t = new AuxProxy();
       t.start();
    }
void sun.awt.im.iiimp.AuxProxy.run ( ) [inline]

Definition at line 72 of file AuxProxy.java.

                      {
       // connection setup
       try {
           hostName = InetAddress.getLocalHost().getHostName();

           Manager.initProps();
           String urlString = Manager.getProperty("iiimp.server");
           if (urlString == null) {
              urlString = "iiimp://" + hostName + ":9010";
           }
           URL url = new URL(urlString);
           uc = (IIIMPURLConnection)url.openConnection();

           if (!uc.isConnected()) {
              uc.connect();

              if (!uc.isConnected()) {
                  throw new IOException();
              }
           }
           in = new IIIMPInputStream(uc.getInputStream());
           out = new IIIMPOutputStream(uc.getOutputStream());
           doSet = new HashSet();
           auxMap = new HashMap();
           odLoader = new ODClassLoader();

           imConnect();
           
           while(true) {
              Protocol protocol = new Protocol();
              protocol.read(in);
              try {
                  driveProtocol(protocol);
              } catch(Exception e) {
                  if (Manager.DEBUG) {
                     e.printStackTrace();
                  }
                  System.exit(1);
              }
           }

       } catch(Exception e) {
           if (Manager.DEBUG) {
              e.printStackTrace();
           }
           System.exit(1);
       }
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.AuxProxy.run ( ) [inline]

Definition at line 72 of file AuxProxy.java.

                      {
       // connection setup
       try {
           hostName = InetAddress.getLocalHost().getHostName();

           Manager.initProps();
           String urlString = Manager.getProperty("iiimp.server");
           if (urlString == null) {
              urlString = "iiimp://" + hostName + ":9010";
           }
           URL url = new URL(urlString);
           uc = (IIIMPURLConnection)url.openConnection();

           if (!uc.isConnected()) {
              uc.connect();

              if (!uc.isConnected()) {
                  throw new IOException();
              }
           }
           in = new IIIMPInputStream(uc.getInputStream());
           out = new IIIMPOutputStream(uc.getOutputStream());
           doSet = new HashSet();
           auxMap = new HashMap();
           odLoader = new ODClassLoader();

           imConnect();
           
           while(true) {
              Protocol protocol = new Protocol();
              protocol.read(in);
              try {
                  driveProtocol(protocol);
              } catch(Exception e) {
                  if (Manager.DEBUG) {
                     e.printStackTrace();
                  }
                  System.exit(1);
              }
           }

       } catch(Exception e) {
           if (Manager.DEBUG) {
              e.printStackTrace();
           }
           System.exit(1);
       }
    }

Here is the call graph for this function:

synchronized void sun.awt.im.iiimp.AuxProxy.send ( Protocol  protocol) throws IOException [inline, private]

Definition at line 466 of file AuxProxy.java.

                                                                         {
       protocol.write(out);
       out.flush();
    }

Here is the caller graph for this function:

synchronized void sun.awt.im.iiimp.AuxProxy.send ( Protocol  protocol) throws IOException [inline, private]

Definition at line 466 of file AuxProxy.java.

                                                                         {
       protocol.write(out);
       out.flush();
    }
void sun.awt.im.iiimp.AuxProxy.setClientType ( ) [inline, package]

This will receive object donwloading candidate before get IM_SETVALUES_REPLY.

Definition at line 143 of file AuxProxy.java.

                         {
       try {
           ProtocolData data = new ProtocolData();
           data.write2(imID);
           data.write2(0); // pad

           IIIMPClientDescripter desc = new IIIMPClientDescripter();
           ProtocolData d = desc.getData();
           data.write4(d.count);
           data.writeBytes(d.buf, d.count);

           send(new Protocol(IM_SETIMVALUES, data));
           getReply(IM_SETIMVALUES_REPLY);
       } catch(Exception e) {
           if (Manager.DEBUG) {
              e.printStackTrace();
           }
       }
    }

Here is the call graph for this function:

void sun.awt.im.iiimp.AuxProxy.setClientType ( ) [inline, package]

This will receive object donwloading candidate before get IM_SETVALUES_REPLY.

Definition at line 143 of file AuxProxy.java.

                         {
       try {
           ProtocolData data = new ProtocolData();
           data.write2(imID);
           data.write2(0); // pad

           IIIMPClientDescripter desc = new IIIMPClientDescripter();
           ProtocolData d = desc.getData();
           data.write4(d.count);
           data.writeBytes(d.buf, d.count);

           send(new Protocol(IM_SETIMVALUES, data));
           getReply(IM_SETIMVALUES_REPLY);
       } catch(Exception e) {
           if (Manager.DEBUG) {
              e.printStackTrace();
           }
       }
    }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 68 of file AuxProxy.java.

static final int IIIMProtocol.BACKGROUND_RGB_FEEDBACK = 2 [static, inherited]

Definition at line 153 of file IIIMProtocol.java.

static final int IIIMProtocol.BIGENDIAN = 0x42 [static, inherited]

Definition at line 116 of file IIIMProtocol.java.

static final int IIIMProtocol.CCDEF = 0x1030 [static, inherited]

Definition at line 134 of file IIIMProtocol.java.

static final int IIIMProtocol.CLAUSE = 3 [static, inherited]

Definition at line 160 of file IIIMProtocol.java.

static final int IIIMProtocol.CLIENT_DESCRIPTER = 0x1011 [static, inherited]

Definition at line 133 of file IIIMProtocol.java.

static final String sun.awt.im.iiimp.AuxProxy.CLIENT_TYPE = "JavaAuxProxy" [static, package]

Definition at line 121 of file AuxProxy.java.

static final int IIIMProtocol.DECORATION_FEEDBACK = 0 [static, inherited]

Definition at line 151 of file IIIMProtocol.java.

Definition at line 67 of file AuxProxy.java.

static final int IIIMProtocol.EIGHTBYTES_PACKET = 1 [static, inherited]

Definition at line 52 of file IIIMProtocol.java.

static final int IIIMProtocol.FOREGROUND_RGB_FEEDBACK = 1 [static, inherited]

Definition at line 152 of file IIIMProtocol.java.

static final int IIIMProtocol.FOURBYTES_PACKET = 0 [static, inherited]

Definition at line 51 of file IIIMProtocol.java.

static final int IIIMProtocol.GUI_CATEGORY = 0 [static, inherited]

Definition at line 145 of file IIIMProtocol.java.

static final int IIIMProtocol.GUI_OBJECT = 0x1031 [static, inherited]

Definition at line 135 of file IIIMProtocol.java.

Definition at line 64 of file AuxProxy.java.

static final int IIIMProtocol.IC_CHARACTER_SUBSETS = 2 [static, inherited]

Definition at line 140 of file IIIMProtocol.java.

static final int IIIMProtocol.IC_INPUT_LANGUAGE = 1 [static, inherited]

Definition at line 139 of file IIIMProtocol.java.

static final int IIIMProtocol.IC_INPUT_METHOD = 3 [static, inherited]

Definition at line 141 of file IIIMProtocol.java.

Definition at line 66 of file AuxProxy.java.

static final String sun.awt.im.iiimp.AuxProxy.IIIMP_PKG_PREFIX = "sun.awt.im" [static, private]

Definition at line 477 of file AuxProxy.java.

static final int IIIMProtocol.IM_AUX_DONE = 94 [static, inherited]

Definition at line 110 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_AUX_DONE_REPLY = 95 [static, inherited]

Definition at line 111 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_AUX_DRAW = 92 [static, inherited]

Definition at line 108 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_AUX_DRAW_REPLY = 93 [static, inherited]

Definition at line 109 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_AUX_SETVALUES = 96 [static, inherited]

Definition at line 112 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_AUX_SETVALUES_REPLY = 97 [static, inherited]

Definition at line 113 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_AUX_START = 90 [static, inherited]

Definition at line 106 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_AUX_START_REPLY = 91 [static, inherited]

Definition at line 107 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_COMMIT_STRING = 14 [static, inherited]

Definition at line 69 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_CONNECT = 1 [static, inherited]

Definition at line 56 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_CONNECT_REPLY = 2 [static, inherited]

Definition at line 57 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_CREATEIC = 20 [static, inherited]

Definition at line 72 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_CREATEIC_REPLY = 21 [static, inherited]

Definition at line 73 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_DESTROYIC = 22 [static, inherited]

Definition at line 74 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_DESTROYIC_REPLY = 23 [static, inherited]

Definition at line 75 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_DISCONNECT = 3 [static, inherited]

Definition at line 58 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_DISCONNECT_REPLY = 4 [static, inherited]

Definition at line 59 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_FORWARD_EVENT = 12 [static, inherited]

Definition at line 67 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_FORWARD_EVENT_REPLY = 13 [static, inherited]

Definition at line 68 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_FORWARD_EVENT_WITH_OPERATIONS = 15 [static, inherited]

Definition at line 70 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_FORWARD_EVENT_WITH_OPERATIONS_REPLY = 16 [static, inherited]

Definition at line 71 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_GETICVALUES = 26 [static, inherited]

Definition at line 78 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_GETICVALUES_REPLY = 27 [static, inherited]

Definition at line 79 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_GETIMVALUES = 10 [static, inherited]

Definition at line 65 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_GETIMVALUES_REPLY = 11 [static, inherited]

Definition at line 66 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_LOOKUP_CHOICE_DONE = 74 [static, inherited]

Definition at line 102 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_LOOKUP_CHOICE_DONE_REPLY = 75 [static, inherited]

Definition at line 103 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_LOOKUP_CHOICE_DRAW = 72 [static, inherited]

Definition at line 100 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_LOOKUP_CHOICE_DRAW_REPLY = 73 [static, inherited]

Definition at line 101 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_LOOKUP_CHOICE_PROCESS = 76 [static, inherited]

Definition at line 104 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_LOOKUP_CHOICE_PROCESS_REPLY = 77 [static, inherited]

Definition at line 105 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_LOOKUP_CHOICE_START = 70 [static, inherited]

Definition at line 98 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_LOOKUP_CHOICE_START_REPLY = 71 [static, inherited]

Definition at line 99 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_NO_PROTOCOL = 0 [static, inherited]

Definition at line 55 of file IIIMProtocol.java.

final int sun.awt.im.iiimp.IIIMProtocol.IM_OPEN_NS = 80 [static, inherited]

Definition at line 107 of file IIIMProtocol.java.

final int sun.awt.im.iiimp.IIIMProtocol.IM_OPEN_NS_REPLY = 81 [static, inherited]

Definition at line 108 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_PREEDIT_DONE = 46 [static, inherited]

Definition at line 90 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_PREEDIT_DONE_REPLY = 47 [static, inherited]

Definition at line 91 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_PREEDIT_DRAW = 42 [static, inherited]

Definition at line 88 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_PREEDIT_DRAW_REPLY = 43 [static, inherited]

Definition at line 89 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_PREEDIT_START = 40 [static, inherited]

Definition at line 86 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_PREEDIT_START_REPLY = 41 [static, inherited]

Definition at line 87 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_REGISTER_TRIGGER_KEYS = 5 [static, inherited]

Definition at line 60 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_RESETIC = 32 [static, inherited]

Definition at line 84 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_RESETIC_REPLY = 33 [static, inherited]

Definition at line 85 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_SETICFOCUS = 28 [static, inherited]

Definition at line 80 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_SETICFOCUS_REPLY = 29 [static, inherited]

Definition at line 81 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_SETICVALUES = 24 [static, inherited]

Definition at line 76 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_SETICVALUES_REPLY = 25 [static, inherited]

Definition at line 77 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_SETIMVALUES = 8 [static, inherited]

Definition at line 63 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_SETIMVALUES_REPLY = 9 [static, inherited]

Definition at line 64 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_STATUS_DONE = 54 [static, inherited]

Definition at line 96 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_STATUS_DONE_REPLY = 55 [static, inherited]

Definition at line 97 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_STATUS_DRAW = 52 [static, inherited]

Definition at line 94 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_STATUS_DRAW_REPLY = 53 [static, inherited]

Definition at line 95 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_STATUS_START = 50 [static, inherited]

Definition at line 92 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_STATUS_START_REPLY = 51 [static, inherited]

Definition at line 93 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_TRIGGER_NOTIFY = 6 [static, inherited]

Definition at line 61 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_TRIGGER_NOTIFY_REPLY = 7 [static, inherited]

Definition at line 62 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_UNSETICFOCUS = 30 [static, inherited]

Definition at line 82 of file IIIMProtocol.java.

static final int IIIMProtocol.IM_UNSETICFOCUS_REPLY = 31 [static, inherited]

Definition at line 83 of file IIIMProtocol.java.

Definition at line 65 of file AuxProxy.java.

Definition at line 62 of file AuxProxy.java.

static final int IIIMProtocol.INPUT_LANGUAGE = 4 [static, inherited]

Definition at line 122 of file IIIMProtocol.java.

static final int IIIMProtocol.INPUT_STRING = 0 [static, inherited]

Definition at line 157 of file IIIMProtocol.java.

static final int IIIMProtocol.INPUTMETHOD_LIST = 0x1001 [static, inherited]

Definition at line 131 of file IIIMProtocol.java.

static final String sun.awt.im.iiimp.AuxProxy.JAVA_PROTOCOL_HANDLER_PKGS = "java.protocol.handler.pkgs" [static, private]

Definition at line 478 of file AuxProxy.java.

static final int IIIMProtocol.KEYEVENT = 2 [static, inherited]

Definition at line 128 of file IIIMProtocol.java.

static final int IIIMProtocol.LITTLEENDIAN = 0x6c [static, inherited]

Definition at line 117 of file IIIMProtocol.java.

static final int IIIMProtocol.LOOKUP_MAX_NUMBER = 1 [static, inherited]

Definition at line 119 of file IIIMProtocol.java.

static final int IIIMProtocol.LOOKUP_STYLE = 2 [static, inherited]

Definition at line 120 of file IIIMProtocol.java.

static final int IIIMProtocol.LWE_CATEGORY = 1 [static, inherited]

Definition at line 146 of file IIIMProtocol.java.

static final int IIIMProtocol.LWE_OBJECT = 0x1032 [static, inherited]

Definition at line 136 of file IIIMProtocol.java.

static final int IIIMProtocol.MANAGE_RULE_CATEGORY = 3 [static, inherited]

Definition at line 148 of file IIIMProtocol.java.

static final int IIIMProtocol.NOID = -1 [static, inherited]

Definition at line 144 of file IIIMProtocol.java.

static final int IIIMProtocol.OBJECT_DESCRIPTER_LIST = 0x1010 [static, inherited]

Definition at line 132 of file IIIMProtocol.java.

Definition at line 69 of file AuxProxy.java.

Definition at line 63 of file AuxProxy.java.

static final int IIIMProtocol.PART_OF_SPEECH = 2 [static, inherited]

Definition at line 159 of file IIIMProtocol.java.

static final int IIIMProtocol.PRIMARY_LANGUAGE = 5 [static, inherited]

Definition at line 123 of file IIIMProtocol.java.

static final int IIIMProtocol.QUERY_LOOKUP_STYLE = 3 [static, inherited]

Definition at line 121 of file IIIMProtocol.java.

static final int IIIMProtocol.READING = 1 [static, inherited]

Definition at line 158 of file IIIMProtocol.java.

static final int IIIMProtocol.STRING = 0 [static, inherited]

Definition at line 126 of file IIIMProtocol.java.

static final int IIIMProtocol.SYNTAX_RULE_CATEGORY = 2 [static, inherited]

Definition at line 147 of file IIIMProtocol.java.

static final int IIIMProtocol.TEXT = 1 [static, inherited]

Definition at line 127 of file IIIMProtocol.java.

Definition at line 70 of file AuxProxy.java.

static final int IIIMProtocol.UNDERLINE_RGB_FEEDBACK = 3 [static, inherited]

Definition at line 154 of file IIIMProtocol.java.

static final int IIIMProtocol.VERSION = 1 [static, inherited]

Definition at line 48 of file IIIMProtocol.java.


The documentation for this class was generated from the following files: