/** * Compare two version strings. Return 1, 0 or -1 if v1 is greater than, equal to, or less than v2. */ public static synchronized int compareVersion(String v1, String v2) { return compareVersion(parseVersion(v1), parseVersion(v2)); }
public static synchronized void dprint(String className, String msg) { System.out.println(compressClassName(className) + "(" + getThreadName(Thread.currentThread()) + "): " + msg); }
protected void dprint(String msg) { if (debug) ORBUtility.dprint(this, msg); }
public static synchronized void dprintTrace(Object obj, String msg) { ORBUtility.dprint(obj, msg); Throwable thr = new Throwable(); printStackTrace(thr.getStackTrace()); }
synchronized int releaseAll() { try { if (debug) ORBUtility.dprintTrace(this, "releaseAll enter: " + " holder_=" + ORBUtility.getThreadName(holder_) + " counter_=" + counter_); Thread thr = Thread.currentThread(); if (thr != holder_) throw new INTERNAL("Attempt to releaseAll Mutex by thread not holding the Mutex"); int result = counter_; counter_ = 0; holder_ = null; notify(); return result; } finally { if (debug) ORBUtility.dprintTrace(this, "releaseAll exit: " + " holder_=" + ORBUtility.getThreadName(holder_) + " counter_=" + counter_); } }
/** * Static method for reading a CORBA standard exception from a stream. * * @param strm * The InputStream to use for unmarshaling. */ public static SystemException readSystemException(InputStream strm) { try { String name = classNameOf(strm.read_string()); SystemException ex = (SystemException) ORBClassLoader.loadClass(name).newInstance(); ex.minor = strm.read_long(); ex.completed = CompletionStatus.from_int(strm.read_long()); return ex; } catch (Exception ex) { throw wrapper.unknownSysex(CompletionStatus.COMPLETED_MAYBE, ex); } }
public synchronized IOR getIOR() { if (ior == null) { ior = ORBUtility.getIOR(obj); } return ior; } }
public static synchronized void dprint(java.lang.Object caller, String msg, Throwable t) { System.out.println(compressClassName(caller.getClass().getName()) + '(' + Thread.currentThread() + "): " + msg); if (t != null) printStackTrace(t.getStackTrace()); }
classTC = (TypeCodeImpl) ValueUtility.createTypeCodeForClass(tcORB, c, ORBUtility.createValueHandler(tcORB));
public void write_Object(org.omg.CORBA.Object ref) { if (ref == null) { IOR nullIOR = IORFactories.makeIOR(orb); nullIOR.write(parent); return; } // IDL to Java formal 01-06-06 1.21.4.2 if (ref instanceof org.omg.CORBA.LocalObject) throw wrapper.writeLocalObject(CompletionStatus.COMPLETED_MAYBE); IOR ior = ORBUtility.connectAndGetIOR(orb, ref); ior.write(parent); return; }
ORBUtility.dprintTrace(this, "await enter"); ORBUtility.dprintTrace(this, "await exit");
private static String formatStackTraceElement(StackTraceElement ste) { return compressClassName(ste.getClassName()) + "." + ste.getMethodName() + (ste.isNativeMethod() ? "(Native Method)" : (ste.getFileName() != null && ste.getLineNumber() >= 0 ? "(" + ste.getFileName() + ":" + ste.getLineNumber() + ")" : (ste.getFileName() != null ? "(" + ste.getFileName() + ")" : "(Unknown Source)"))); }
private static void printStackTrace(StackTraceElement[] trace) { System.out.println(" Stack Trace:"); // print the stack trace, ommitting the zeroth element, which is // always this method. for (int ctr = 1; ctr < trace.length; ctr++) { System.out.print(" >"); System.out.println(formatStackTraceElement(trace[ctr])); } }
public MaxStreamFormatVersionComponentImpl() { version = ORBUtility.getMaxStreamFormatVersion(); }
public synchronized void release() { try { if (debug) ORBUtility.dprintTrace(this, "release enter: " + " holder_=" + ORBUtility.getThreadName(holder_) + " counter_=" + counter_); Thread thr = Thread.currentThread(); if (thr != holder_) throw new INTERNAL("Attempt to release Mutex by thread not holding the Mutex"); else counter_--; if (counter_ == 0) { holder_ = null; notify(); } } finally { if (debug) ORBUtility.dprintTrace(this, "release exit: " + " holder_=" + ORBUtility.getThreadName(holder_) + " counter_=" + counter_); } }
/** * Static method for reading a CORBA standard exception from a stream. * * @param strm * The InputStream to use for unmarshaling. */ public static SystemException readSystemException(InputStream strm) { try { String name = classNameOf(strm.read_string()); SystemException ex = (SystemException) ORBClassLoader.loadClass(name).newInstance(); ex.minor = strm.read_long(); ex.completed = CompletionStatus.from_int(strm.read_long()); return ex; } catch (Exception ex) { throw wrapper.unknownSysex(CompletionStatus.COMPLETED_MAYBE, ex); } }
public synchronized IOR getIOR() { if (ior == null) { ior = ORBUtility.getIOR(obj); } return ior; } }
public static synchronized void dprintTrace(Object obj, String msg) { ORBUtility.dprint(obj, msg); Throwable thr = new Throwable(); printStackTrace(thr.getStackTrace()); }
public static synchronized void dprint(java.lang.Object caller, String msg, Throwable t) { System.out.println(compressClassName(caller.getClass().getName()) + '(' + Thread.currentThread() + "): " + msg); if (t != null) printStackTrace(t.getStackTrace()); }
classTC = (TypeCodeImpl) ValueUtility.createTypeCodeForClass(tcORB, c, ORBUtility.createValueHandler(tcORB));