public ExceptionRWRMIImpl(Class<?> cls) { super(cls); setId(IDLNameTranslatorImpl.getExceptionId(cls)); }
public static String getExceptionId(Class<?> cls) { // Requirements for this method: // 1. cls must be an exception but not a RemoteException. // 2. If cls has an IDL keyword name, an underscore is prepended (1.3.2.2). // 3. If cls jas a leading underscore, J is prepended (1.3.2.3). // 4. If cls has an illegal IDL ident char, it is mapped to UXXXX where // XXXX is the unicode value in hex of the char (1.3.2.4). // 5. double underscore for inner class (1.3.2.5). // 6. The ID is "IDL:" + name with / separators + ":1.0". IDLType itype = classToIDLType(cls); return itype.getExceptionName(); }
/** * Return an IDLNameTranslator for the given interfacex. * * @throws IllegalStateException * if given classes are not valid RMI/IIOP Remote Interfaces */ public static IDLNameTranslator get(Class<?>[] interfaces) { return new IDLNameTranslatorImpl(interfaces); }
private static String getMappedContainerName(Class<?> c) { String unmappedName = getUnmappedContainerName(c); return mangleIdentifier(unmappedName); }
public Object[] readArguments(InputStream is) { Object[] result = null; if (hasArguments) { result = new Object[argRWs.length]; for (int ctr = 0; ctr < argRWs.length; ctr++) result[ctr] = argRWs[ctr].read(is); } return result; }
public static PresentationManager.StubFactory makeStaticStubFactory(Class<?> stubClass) { return new StubFactoryStaticImpl(stubClass); } }
public synchronized static PresentationManager.StubFactoryFactory getStaticStubFactoryFactory() { if (staticImpl == null) staticImpl = new StubFactoryFactoryStaticImpl(); return staticImpl; }
public ExceptionRW getRMIExceptionRW(Class<?> cls) { return new ExceptionRWRMIImpl(cls); } }
public Exception readException(ApplicationException ae) { return ehandler.readException(ae); } }
public String getModuleName() { // Note that this should probably be makeConcatenatedName( '/', true ) for spec compliance, but rmic does it // this way, so we'll leave this. // The effect is that an overloaded method like void foo( bar.typedef.Baz ) will get an IDL name of // foo__bar_typedef_Baz instead of foo__bar__typedef_Baz (note the extra _ before typedef). return makeConcatenatedName('_', false); }
/** * Perform all necessary stand-alone identifier mangling operations on a java identifier that is being transformed * into an IDL name. That is, mangling operations that don't require looking at anything else but the identifier * itself. This covers sections 1.3.2.2, 1.3.2.3, and 1.3.2.4 of the Java2IDL spec. Method overloading and * case-sensitivity checks are handled elsewhere. */ private static String mangleIdentifier(String identifier) { return mangleIdentifier(identifier, false); }
public void writeResult(OutputStream os, Object result) { if (!hasVoidResult) resultRW.write(os, result); }
public PresentationManager.StubFactory makeDynamicStubFactory(PresentationManager pm, PresentationManager.ClassData classData, ClassLoader classLoader) { return new StubFactoryProxyImpl(classData, classLoader); } }
public void writeException(OutputStream os, Exception ex) { ehandler.writeException(os, ex); }
public ExceptionRWRMIImpl(Class<?> cls) { super(cls); setId(IDLNameTranslatorImpl.getExceptionId(cls)); }
public static String getExceptionId(Class<?> cls) { // Requirements for this method: // 1. cls must be an exception but not a RemoteException. // 2. If cls has an IDL keyword name, an underscore is prepended (1.3.2.2). // 3. If cls jas a leading underscore, J is prepended (1.3.2.3). // 4. If cls has an illegal IDL ident char, it is mapped to UXXXX where // XXXX is the unicode value in hex of the char (1.3.2.4). // 5. double underscore for inner class (1.3.2.5). // 6. The ID is "IDL:" + name with / separators + ":1.0". IDLType itype = classToIDLType(cls); return itype.getExceptionName(); }
private static String getMappedContainerName(Class<?> c) { String unmappedName = getUnmappedContainerName(c); return mangleIdentifier(unmappedName); }
/** * Return an IDLNameTranslator for the given interface. * * @throws IllegalStateException * if given class is not a valid RMI/IIOP Remote Interface */ public static IDLNameTranslator get(Class<?> interf) { return new IDLNameTranslatorImpl(new Class<?>[]{interf}); }
public Object readResult(InputStream is) { if (hasVoidResult) return null; else return resultRW.read(is); }
/** * Return an IDLNameTranslator for the given interface. * * @throws IllegalStateException * if given class is not a valid RMI/IIOP Remote Interface */ public static IDLNameTranslator get(Class<?> interf) { return new IDLNameTranslatorImpl(new Class<?>[]{interf}); }