You are viewing a plain text version of this content. The canonical link for it is here.
Posted to kato-commits@incubator.apache.org by mo...@apache.org on 2009/09/30 12:35:58 UTC

svn commit: r820255 - in /incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi: JDICacher.java JDIController.java JDWPServer.java KatoReader.java Packet.java

Author: monteith
Date: Wed Sep 30 12:35:57 2009
New Revision: 820255

URL: http://svn.apache.org/viewvc?rev=820255&view=rev
Log:
Purge references to DTFJ from JDI connector.

Modified:
    incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/JDICacher.java
    incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/JDIController.java
    incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/JDWPServer.java
    incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/KatoReader.java
    incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/Packet.java

Modified: incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/JDICacher.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/JDICacher.java?rev=820255&r1=820254&r2=820255&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/JDICacher.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/JDICacher.java Wed Sep 30 12:35:57 2009
@@ -26,8 +26,8 @@
 
 /* JDICacher
  * 
- * JDICacher lies as a layer between the JDWPServer and the DTFJReader.  It times the returns
- * from DTFJReader, and if they're over a certain amount of time, it stores them in a vector
+ * JDICacher lies as a layer between the JDWPServer and the KatoReader.  It times the returns
+ * from KatoReader, and if they're over a certain amount of time, it stores them in a vector
  * so that future calls return the vectorized version.  The actual class that's stored in the
  * Vector is a CommandReplyPair, which stores a command and it's reply.  On read, we search
  * all the pairs for a matching CommandPacket, and directly return it's ReplyPacket.  Most of
@@ -77,9 +77,9 @@
 		logr = logger;
 		logr.log(JDILogger.LEVEL_VERYVERBOSE, "JDICacher 1.0"); //$NON-NLS-1$
 		this.coreFile = coreFile;
-		logr.log(JDILogger.LEVEL_VERYVERBOSE, "Creating DTFJReader"); //$NON-NLS-1$
+		logr.log(JDILogger.LEVEL_VERYVERBOSE, "Creating KatoReader"); //$NON-NLS-1$
 		provider = new KatoReader(coreFile, svr, JDILogger.logger);
-		logr.log(JDILogger.LEVEL_VERYVERBOSE, "DTFJReader created"); //$NON-NLS-1$
+		logr.log(JDILogger.LEVEL_VERYVERBOSE, "KatoReader created"); //$NON-NLS-1$
 
 
 

Modified: incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/JDIController.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/JDIController.java?rev=820255&r1=820254&r2=820255&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/JDIController.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/JDIController.java Wed Sep 30 12:35:57 2009
@@ -141,7 +141,7 @@
 
 		svr.setTerminateLastClient(autoTerm);
 		
-		//Rather than keep making the same requests to the DTFJ reader
+		//Rather than keep making the same requests to the Kato reader
 		//Use an intermediate cache
 		svr.setCache(chsr);
 

Modified: incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/JDWPServer.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/JDWPServer.java?rev=820255&r1=820254&r2=820255&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/JDWPServer.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/JDWPServer.java Wed Sep 30 12:35:57 2009
@@ -21,8 +21,8 @@
  * JDWPServer provides the high-level core to JDI.  It starts the socket server, and provides
  * facilities to convert bytes to and from the Packet class, as well as calling the outbound socket.
  * The sockets directly call writeRawPacket(...) which converts bytes into a Packet Vector, which
- * is one by one fired at the cache.  The cache has access to the DTFJReader, which converts the
- * Packet into a set of DTFJ calls (basically a JDWP <--> DTFJ layer), and then assembles a new
+ * is one by one fired at the cache.  The cache has access to the KatoReader, which converts the
+ * Packet into a set of Kato calls (basically a JDWP <--> Kato layer), and then assembles a new
  * packet, and returns back up to writeRawPacket(...) which converts the Packet back to bytes and
  * explicitly calls the write on the socket and back to the client
  * 
@@ -78,7 +78,7 @@
 			//Set the preferences set earlier for disconnection policy
 			sockServe.setTerminateLastClient(lastClientTerm);
 		}catch(Exception exxy){
-			//If we error out, shut down DTFJ
+			//If we error out, shut down Kato
 			getCache().getProvider().stop();
 
 			//And log it

Modified: incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/KatoReader.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/KatoReader.java?rev=820255&r1=820254&r2=820255&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/KatoReader.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/KatoReader.java Wed Sep 30 12:35:57 2009
@@ -48,20 +48,20 @@
 
 
 /**
- * DTFJReader
+ * KatoReader
  * 
- * DTFJReader is our second conversion layer (after JDWPServer).  DTFJReader has two functions:
+ * KatoReader is our second conversion layer (after JDWPServer).  KatoReader has two functions:
  * <ol>
- * <li> Convert JDWP <--> DTFJ</li>
+ * <li> Convert JDWP <--> Kato</li>
  * <li> Provide several convenience methods </li>
  * </ol>
  * 
  * <ol>
  * <li>
  *    <p>
- *    DTFJReader directly takes the raw protocol (in it's object version) and runs some calls to
+ *    KatoReader directly takes the raw protocol (in it's object version) and runs some calls to
  *    get the JDWP reply.  Only a small portion of the JDWP protocol is specified in a way that
- *    we can reliably create objects, so a lot of time the DTFJReader methods will extract their
+ *    we can reliably create objects, so a lot of time the KatoReader methods will extract their
  *    own information from a raw byte 'data' segment of the original packet.  On the reply, we
  *    copy some of the information from the CommandPacket (such as sequence and origin socket)
  *    and then create a data segment.
@@ -191,16 +191,16 @@
 	}
 
 	/**
-	 * Constructor to init DTFJ reader
+	 * Constructor to init Kato reader
 	 * 
 	 * @param ipathToCore 	Path to core (absolute or relative)
 	 * @param isvr 			JDWPServer used for communication back up
 	 * @param logger		JDILogger to use to log against
-	 * @throws Exception	An error passed up from the DTFJ api, or sanity test fail
+	 * @throws Exception	An error passed up from the Kato api, or sanity test fail
 	 */
 	public KatoReader(String ipathToCore, JDWPServer isvr, JDILogger logger) throws Exception{
 		logr = logger;
-		logr.log(JDILogger.LEVEL_VERYVERBOSE, "DTFJReader 1.0"); //$NON-NLS-1$
+		logr.log(JDILogger.LEVEL_VERYVERBOSE, "KatoReader 1.0"); //$NON-NLS-1$
 		pathToCore = ipathToCore;
 		svr = isvr;
 		vctrs = new HashMap<Long, String>();
@@ -210,13 +210,13 @@
 	}
 
 	/**
-	 * Given a DTFJ JavaField and JavaObject, add the tagged value to the vector vctr
+	 * Given a Kato JavaField and JavaObject, add the tagged value to the vector vctr
 	 * 
 	 * @param vctr			Current byte vector for the data segment of the packet
 	 * @param jObject		Object to which get the value from
 	 * @param jField		The field of a class to get the value from
 	 * @return				false if the operation failed, true if it succeeds
-	 * @throws Exception	Exception passed up if underlying DTFJ calls fail
+	 * @throws Exception	Exception passed up if underlying Kato calls fail
 	 */
 
 	private boolean getValueFromField(Vector<Byte> vctr, JavaObject jObject, JavaField jField) throws Exception{
@@ -478,7 +478,7 @@
 	/**
 	 * Get the method object given a methodID
 	 * @param methodID	Address of the method as stored in the vector
-	 * @return The DTFJ JavaMethod
+	 * @return The Kato JavaMethod
 	 */
 	private JavaMethod getMethod(long methodID){
 		if (intToMethod == null){
@@ -491,7 +491,7 @@
 	/**
 	 * Get the field object given a fieldID
 	 * @param fieldID	Address of a given field as stored in the vector
-	 * @return The DTFJ JavaField
+	 * @return The Kato JavaField
 	 */
 	private JavaField getField(long fieldID){
 		if (fieldList == null){
@@ -588,7 +588,7 @@
 	/**
 	 * Given a JavaMethod and class id, return the id of the method
 	 * @param refType The class id as found in the JavaClass vector
-	 * @param jMethod The DTFJ JavaMethod object
+	 * @param jMethod The Kato JavaMethod object
 	 * @return A unique ID for this method
 	 */
 
@@ -604,7 +604,7 @@
 	/**
 	 * Given a JavaField and class id, return the id of the field
 	 * @param refType The class id as found in the JavaClass vector
-	 * @param jField The DTFJ JavaField object
+	 * @param jField The Kato JavaField object
 	 * @return A unique ID for this field
 	 */
 
@@ -1030,9 +1030,9 @@
 	}
 
 	/**
-	 * Given a classID, get the DTFJ JavaClass
+	 * Given a classID, get the Kato JavaClass
 	 * @param classID The unique class ID
-	 * @return The DTFJ JavaClass
+	 * @return The Kato JavaClass
 	 * @throws CorruptDataException
 	 */
 	private JavaClass getClass(long classID){
@@ -1201,7 +1201,7 @@
 					while ( runTimesIt.hasNext( ) )
 					{
 						JavaRuntime javaRT = (JavaRuntime) runTimesIt.next( );
-						//Since there doesn't seem to be a matching DTFJ call to get
+						//Since there doesn't seem to be a matching Kato call to get
 						//the information for JDWP, lets call NOT_IMPLEMENTED, but really
 						//attach some information back
 						ReplyPacket rpckt = new ReplyPacket(cpckt.getSequence(), FLAG_REPLY_PACKET, ERROR_NONE);
@@ -1434,7 +1434,7 @@
 			ReplyPacket rpckt = new ReplyPacket(cpckt.getSequence(), FLAG_REPLY_PACKET, ERROR_NONE);
 			return rpckt;
 		}else if (cpckt.getCommand() == VIRTUAL_MACHINE_EXIT){
-			shutDownDTFJ();
+			shutDownKato();
 			//This is a disconnect request
 			logr.log(JDILogger.LEVEL_VERBOSE, "Exit()"); //$NON-NLS-1$
 			logr.log(JDILogger.LEVEL_NORMAL, "Remove client asked termination of server"); //$NON-NLS-1$
@@ -2115,7 +2115,7 @@
 	/**
 	 * Given an objectID, return the object associated with it.  Check the cache first.
 	 * @param objectID The unique ID of the object
-	 * @return The DTFJ JavaObject
+	 * @return The Kato JavaObject
 	 */
 	private JavaObject getObject(long objectID){
 		if (objectMap == null){
@@ -2203,7 +2203,7 @@
 	/**
 	 * Given a the name for a class, iterate through all the classes
 	 * @param name The name of the class to search
-	 * @return The DTFJ JavaClass result
+	 * @return The Kato JavaClass result
 	 * @throws Exception
 	 */
 	private JavaClass findClassByName(String name) throws Exception{
@@ -2725,7 +2725,7 @@
 
 			//ThreadGroup
 			//This call returns the group of the input thread.
-			//TODO - Since this doesn't seem available in DTFJ, let's fake it with 0
+			//TODO - Since this doesn't seem available in Kato, let's fake it with 0
 			// Lets fake it with 1 ...
 			byte [] inData = cpckt.getByteData();
 			long thread = createLongFromBytes(inData, 0, 8);
@@ -3632,10 +3632,10 @@
 	}
 
 	public void stop(){
-		shutDownDTFJ();
+		shutDownKato();
 	}
 
-	private void shutDownDTFJ(){
+	private void shutDownKato(){
 		vctrs.clear();
 		intToMethod.clear();
 		classes.clear();

Modified: incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/Packet.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/Packet.java?rev=820255&r1=820254&r2=820255&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/Packet.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/Packet.java Wed Sep 30 12:35:57 2009
@@ -21,14 +21,14 @@
  * common data information between them.
  * 
  * We maintain a WeakReference to our parent packet (original JDISocket).  At the
- * JDWPServer level, we set the packet, and then send it down to DTFJ, then set the
+ * JDWPServer level, we set the packet, and then send it down to Kato, then set the
  * convert to bytes and send it to the socket.  Most of the time, nothing below the
  * JDWPServer sets a reply packet socket, so we do it in JDWPServer if it's unset.
  * 
  * JDICacher sometimes sets the socket explicitly.
  * 
  * We also keep a packet level cache setting, which may or may not be set by the
- * DTFJReader, however, the JDICacher sometime may override with the ForceCache
+ * KatoReader, however, the JDICacher sometime may override with the ForceCache
  * option.
  */