From 7fc59714865b86b97bb6a1ae1d5e77e9d591aaaa Mon Sep 17 00:00:00 2001 From: Kay Ramme Date: Thu, 17 May 2001 11:46:28 +0000 Subject: renamed ThreadID -> ThreadId --- .../lib/uno/environments/remote/IProtocol.java | 10 ++++---- .../lib/uno/environments/remote/IReceiver.java | 8 +++--- .../sun/star/lib/uno/environments/remote/Job.java | 19 +++++++------- .../sun/star/lib/uno/protocols/urp/Marshal.java | 18 ++++++------- .../sun/star/lib/uno/protocols/urp/Unmarshal.java | 23 +++++++++-------- jurt/com/sun/star/lib/uno/protocols/urp/urp.java | 30 +++++++++++----------- 6 files changed, 54 insertions(+), 54 deletions(-) diff --git a/jurt/com/sun/star/lib/uno/environments/remote/IProtocol.java b/jurt/com/sun/star/lib/uno/environments/remote/IProtocol.java index 06fd9ec45523..9246a358533b 100644 --- a/jurt/com/sun/star/lib/uno/environments/remote/IProtocol.java +++ b/jurt/com/sun/star/lib/uno/environments/remote/IProtocol.java @@ -2,9 +2,9 @@ * * $RCSfile: IProtocol.java,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: kr $ $Date: 2001-05-08 09:41:00 $ + * last change: $Author: kr $ $Date: 2001-05-17 12:46:27 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -77,7 +77,7 @@ import com.sun.star.uno.ITypeDescription; * This interface provides an abstraction for protocols * for remote bridges. *

- * @version $Revision: 1.6 $ $ $Date: 2001-05-08 09:41:00 $ + * @version $Revision: 1.7 $ $ $Date: 2001-05-17 12:46:27 $ * @author Kay Ramme * @see com.sun.star.lib.uno.environments.remote.IMessage * @see com.sun.star.lib.uno.environments.remote.Job @@ -102,12 +102,12 @@ public interface IProtocol { public void writeRequest(String oid, ITypeDescription zInterface, String operation, - ThreadID threadId, + ThreadId threadId, Object params[], Boolean synchron[], Boolean mustReply[]); - public void writeReply(boolean exception, ThreadID threadId, Object result); + public void writeReply(boolean exception, ThreadId threadId, Object result); public void flush(java.io.DataOutput dataOutput) throws IOException; diff --git a/jurt/com/sun/star/lib/uno/environments/remote/IReceiver.java b/jurt/com/sun/star/lib/uno/environments/remote/IReceiver.java index 120fef319268..20b802e621fc 100644 --- a/jurt/com/sun/star/lib/uno/environments/remote/IReceiver.java +++ b/jurt/com/sun/star/lib/uno/environments/remote/IReceiver.java @@ -2,9 +2,9 @@ * * $RCSfile: IReceiver.java,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: kr $ $Date: 2001-05-04 11:56:03 $ + * last change: $Author: kr $ $Date: 2001-05-17 12:46:27 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -70,7 +70,7 @@ import com.sun.star.lib.uno.environments.java.IRequester; * This interface is an abstraction for giving back * a reply for a request. *

- * @version $Revision: 1.2 $ $ $Date: 2001-05-04 11:56:03 $ + * @version $Revision: 1.3 $ $ $Date: 2001-05-17 12:46:27 $ * @author Kay Ramme * @see com.sun.star.uno.IQueryInterface */ @@ -86,6 +86,6 @@ public interface IReceiver { * @param params the out and in/out parameters passed with the request * @param signature the types of the out and in/out parameters */ - public void sendReply(boolean exception, ThreadID threadId, Object result); + public void sendReply(boolean exception, ThreadId threadId, Object result); } diff --git a/jurt/com/sun/star/lib/uno/environments/remote/Job.java b/jurt/com/sun/star/lib/uno/environments/remote/Job.java index cae1741d8b01..023f48c9b728 100644 --- a/jurt/com/sun/star/lib/uno/environments/remote/Job.java +++ b/jurt/com/sun/star/lib/uno/environments/remote/Job.java @@ -2,9 +2,9 @@ * * $RCSfile: Job.java,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: kr $ $Date: 2001-05-08 09:41:00 $ + * last change: $Author: kr $ $Date: 2001-05-17 12:46:27 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -81,7 +81,7 @@ import com.sun.star.uno.UnoRuntime; * The Job is an abstraction for tasks which have to be done * remotely because of a method invocation. *

- * @version $Revision: 1.8 $ $ $Date: 2001-05-08 09:41:00 $ + * @version $Revision: 1.9 $ $ $Date: 2001-05-17 12:46:27 $ * @author Kay Ramme * @see com.sun.star.lib.uno.environments.remote.ThreadID * @see com.sun.star.lib.uno.environments.remote.IReceiver @@ -103,7 +103,7 @@ public class Job { _iReceiver = iReceiver; _iMessage = iMessage; - if(DEBUG) System.err.println("##### " + getClass().getName() + ".:" + _iReceiver + " " + _iMessage); + if(DEBUG) System.err.println("##### " + getClass().getName() + ".:" + _iReceiver + " " + _iMessage + " " + iMessage.getOperation() + " " + iMessage.getData(new Object[1][])); } /** @@ -159,7 +159,7 @@ public class Job { Object result = _iMessage.getData(params); - if(DEBUG) System.err.println("##### " + getClass().getName() + ".execute:" + result); + if(DEBUG) System.err.println("##### " + getClass().getName() + ".execute:" + result + " " + _iMessage.isException()); if(_iMessage.isException()) throw (Throwable)result; @@ -174,7 +174,7 @@ public class Job { xresult = dispatch_MethodCall(params[0]); if(_iMessage.mustReply()) - _iReceiver.sendReply(false, _iMessage.getThreadID(), xresult); + _iReceiver.sendReply(false, _iMessage.getThreadId(), xresult); } } catch(Exception exception) { @@ -185,7 +185,6 @@ public class Job { throwable = ((InvocationTargetException)exception).getTargetException();; if(DEBUG) System.err.println("##### Job.execute - exception occured:" + throwable); - // Here we have to be aware of non UNO exceptions, cause they may kill // a remote side (which does not know anything about theire types) if(!(throwable instanceof com.sun.star.uno.Exception) @@ -197,7 +196,7 @@ public class Job { } if(_iMessage.mustReply()) - _iReceiver.sendReply(true, _iMessage.getThreadID(), throwable); + _iReceiver.sendReply(true, _iMessage.getThreadId(), throwable); } return result; @@ -226,8 +225,8 @@ public class Job { *

* @return returns the thread id */ - public ThreadID getThreadId() { - return _iMessage.getThreadID(); + public ThreadId getThreadId() { + return _iMessage.getThreadId(); } /** diff --git a/jurt/com/sun/star/lib/uno/protocols/urp/Marshal.java b/jurt/com/sun/star/lib/uno/protocols/urp/Marshal.java index 6725d1031b79..55b7aa87f53c 100644 --- a/jurt/com/sun/star/lib/uno/protocols/urp/Marshal.java +++ b/jurt/com/sun/star/lib/uno/protocols/urp/Marshal.java @@ -2,9 +2,9 @@ * * $RCSfile: Marshal.java,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: kr $ $Date: 2001-05-08 09:41:01 $ + * last change: $Author: kr $ $Date: 2001-05-17 12:46:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -89,7 +89,7 @@ import com.sun.star.uno.XInterface; import com.sun.star.lib.uno.environments.remote.IMarshal; import com.sun.star.lib.uno.environments.remote.Protocol; -import com.sun.star.lib.uno.environments.remote.ThreadID; +import com.sun.star.lib.uno.environments.remote.ThreadId; import com.sun.star.uno.ITypeDescription; import com.sun.star.uno.IFieldDescription; @@ -384,8 +384,8 @@ class Marshal implements IMarshal { case TypeClass.DOUBLE_value: writeDouble((Double)object); break; // is it a double ? case TypeClass.STRING_value: writeString((String)object); break; // is it a String ? case TypeClass.STRUCT_value: - if(object instanceof ThreadID) // is it a thread id ? - writeThreadID((ThreadID)object); + if(object instanceof ThreadId) // is it a thread id ? + writeThreadId((ThreadId)object); else // is it a struct ? writeStruct(iTypeDescription, object); @@ -502,17 +502,17 @@ class Marshal implements IMarshal { } } - void writeThreadID(ThreadID threadID) { - if(DEBUG) System.err.println("##### " + getClass().getName() + ".writeThreadID:" + threadID); + void writeThreadId(ThreadId threadId) { + if(DEBUG) System.err.println("##### " + getClass().getName() + ".writeThreadID:" + threadId); boolean found[] = new boolean[1]; short index; if(_useCaches) - index = _threadIdCache.add(found, threadID.getBytes()); + index = _threadIdCache.add(found, threadId.getBytes()); else index = (short)0xffff; - M_ThreadId m_ThreadId = new M_ThreadId(found[0] ? null : threadID.getBytes(), index); + M_ThreadId m_ThreadId = new M_ThreadId(found[0] ? null : threadId.getBytes(), index); writeObject(__M_ThreadIdTypeDescription, m_ThreadId); } diff --git a/jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal.java b/jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal.java index 02d5715137c7..67e104c5a407 100644 --- a/jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal.java +++ b/jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal.java @@ -2,9 +2,9 @@ * * $RCSfile: Unmarshal.java,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: kr $ $Date: 2001-05-08 09:41:01 $ + * last change: $Author: kr $ $Date: 2001-05-17 12:46:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -89,7 +89,7 @@ import com.sun.star.uno.XInterface; import com.sun.star.lib.uno.environments.remote.IUnmarshal; import com.sun.star.lib.uno.environments.remote.Protocol; -import com.sun.star.lib.uno.environments.remote.ThreadID; +import com.sun.star.lib.uno.environments.remote.ThreadId; import com.sun.star.uno.ITypeDescription; import com.sun.star.uno.IFieldDescription; @@ -107,14 +107,14 @@ class Unmarshal implements IUnmarshal { private IBridge _iBridge; private Object _objectCache[]; private ITypeDescription _iTypeDescriptionCache[]; - private ThreadID _threadIdCache[]; + private ThreadId _threadIdCache[]; Unmarshal(IBridge iBridge, short cacheSize) { _iBridge = iBridge; _objectCache = new Object[cacheSize]; _iTypeDescriptionCache = new ITypeDescription[cacheSize]; - _threadIdCache = new ThreadID[cacheSize]; + _threadIdCache = new ThreadId[cacheSize]; _inputStream = new ByteArrayInputStream(new byte[0]); _dataInput = new DataInputStream(_inputStream); } @@ -377,8 +377,9 @@ class Unmarshal implements IUnmarshal { case TypeClass.STRING_value: result = readString(); break; // is it a String ? case TypeClass.EXCEPTION_value: result = readThrowable(iTypeDescription); break; // is it an exception? case TypeClass.STRUCT_value: - if(iTypeDescription.getZClass() == ThreadID.class) // read a thread id ? - result = readThreadID(); + if(iTypeDescription.getZClass() == ThreadId.class) // read a thread id ? + result = readThreadId(); + else // otherwise read a struct result = readStruct(iTypeDescription); @@ -528,19 +529,19 @@ class Unmarshal implements IUnmarshal { } } - ThreadID readThreadID() { + ThreadId readThreadId() { Marshal.M_ThreadId m_threadId = (Marshal.M_ThreadId)readObject(Marshal.__M_ThreadIdTypeDescription); - ThreadID threadId = null; + ThreadId threadId = null; if(m_threadId.cache != (short)0xffff) { // is the cache entry valid? if(m_threadId.full.length != 0) - _threadIdCache[m_threadId.cache] = new ThreadID(m_threadId.full); + _threadIdCache[m_threadId.cache] = new ThreadId(m_threadId.full); threadId = _threadIdCache[m_threadId.cache]; } else if(m_threadId.full.length != 0) - threadId = new ThreadID(m_threadId.full); + threadId = new ThreadId(m_threadId.full); if(DEBUG) System.err.println("##### " + getClass().getName() + ".readThreadID:" + _threadIdCache[m_threadId.cache]); diff --git a/jurt/com/sun/star/lib/uno/protocols/urp/urp.java b/jurt/com/sun/star/lib/uno/protocols/urp/urp.java index 56f00bdaf4d1..48b9979e33c8 100644 --- a/jurt/com/sun/star/lib/uno/protocols/urp/urp.java +++ b/jurt/com/sun/star/lib/uno/protocols/urp/urp.java @@ -2,9 +2,9 @@ * * $RCSfile: urp.java,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: kr $ $Date: 2001-05-08 09:41:01 $ + * last change: $Author: kr $ $Date: 2001-05-17 12:46:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -79,7 +79,7 @@ import com.sun.star.lib.uno.environments.remote.IMarshal; import com.sun.star.lib.uno.environments.remote.IMessage; import com.sun.star.lib.uno.environments.remote.Protocol; import com.sun.star.lib.uno.environments.remote.IUnmarshal; -import com.sun.star.lib.uno.environments.remote.ThreadID; +import com.sun.star.lib.uno.environments.remote.ThreadId; import com.sun.star.uno.IMethodDescription; import com.sun.star.uno.ITypeDescription; @@ -97,7 +97,7 @@ import com.sun.star.uno.Type; * from uno. The functionality is reachable through * the IProtocol interface. *

- * @version $Revision: 1.9 $ $ $Date: 2001-05-08 09:41:01 $ + * @version $Revision: 1.10 $ $ $Date: 2001-05-17 12:46:28 $ * @author Kay Ramme * @see com.sun.star.lib.uno.environments.remote.IProtocol * @since UDK1.0 @@ -116,11 +116,11 @@ public class urp extends Protocol { private String _in_oid; private ITypeDescription _in_interface; - private ThreadID _in_threadId; + private ThreadId _in_threadId; private String _out_oid; private ITypeDescription _out_interface; - private ThreadID _out_threadId; + private ThreadId _out_threadId; private int _message_count; private boolean _ignore_cache; @@ -166,7 +166,7 @@ public class urp extends Protocol { private Object readReply(byte header, boolean exception[]) { if((header & NEWTID) != 0) // new thread id ? - _in_threadId = _unmarshal.readThreadID(); + _in_threadId = _unmarshal.readThreadId(); // get the out signature and parameter array of the reply Object objects[] = (Object[])removePendingRequest(_in_threadId); @@ -274,7 +274,7 @@ public class urp extends Protocol { _in_oid = _unmarshal.readOid(); if((header & NEWTID) != 0) // new thread id ? - _in_threadId = _unmarshal.readThreadID(); + _in_threadId = _unmarshal.readThreadId(); _ignore_cache = ((header & IGNORECACHE) != 0); // do not use cache for this request? @@ -316,7 +316,7 @@ public class urp extends Protocol { public void writeRequest(String oid, ITypeDescription zInterface, String operation, - ThreadID threadId, + ThreadId threadId, Object params[], Boolean synchron[], Boolean mustReply[]) @@ -413,7 +413,7 @@ public class urp extends Protocol { _marshal.writeOid(_out_oid); if(threadId != null) // has the thread id changed? -> write it - _marshal.writeThreadID(threadId); + _marshal.writeThreadId(threadId); } else { // simple request if(iMethodDescription.getIndex() <= 0x2f) // does the method id fit in the header? @@ -443,7 +443,7 @@ public class urp extends Protocol { putPendingRequest(_out_threadId, new Object[]{params, out_sig, iMethodDescription.getReturnSignature()}); } - public void writeReply(boolean exception, ThreadID threadId, Object result) { + public void writeReply(boolean exception, ThreadId threadId, Object result) { if(DEBUG) System.err.println("##### " + getClass().getName() + ".writeReply:" + exception + " " + threadId + " " + result); ++ _message_count; @@ -473,7 +473,7 @@ public class urp extends Protocol { _marshal.writebyte(header); if(threadId != null) // has the thread id changed? -> write it - _marshal.writeThreadID(threadId); + _marshal.writeThreadId(threadId); // write the result _marshal.writeObject(resType, result); @@ -515,7 +515,7 @@ public class urp extends Protocol { Object _result; ITypeDescription _iTypeDescription; String _operation; - ThreadID _threadId; + ThreadId _threadId; boolean _synchron; boolean _mustReply; boolean _exception; @@ -525,7 +525,7 @@ public class urp extends Protocol { Object result, ITypeDescription iTypeDescription, String operation, - ThreadID threadId, + ThreadId threadId, boolean synchron, boolean mustReply, boolean exception, @@ -546,7 +546,7 @@ public class urp extends Protocol { return _operation; } - public ThreadID getThreadID() { + public ThreadId getThreadId() { return _threadId; } -- cgit