ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/uk/org/iscream/cms/server/rootfilter/CIWrapper.java
(Generate patch)

Comparing projects/cms/source/server/uk/org/iscream/cms/server/rootfilter/CIWrapper.java (file contents):
Revision 1.1 by tdb, Tue Jan 2 03:18:56 2001 UTC vs.
Revision 1.10 by tdb, Tue May 29 17:02:35 2001 UTC

# Line 1 | Line 1
1   //---PACKAGE DECLARATION---
2 < package uk.ac.ukc.iscream.rootfilter;
2 > package uk.org.iscream.cms.server.rootfilter;
3  
4   //---IMPORTS---
5 < import uk.ac.ukc.iscream.core.*;
6 < import uk.ac.ukc.iscream.clientinterface.*;
7 < import uk.ac.ukc.iscream.util.*;
5 > import uk.org.iscream.cms.server.core.*;
6 > import uk.org.iscream.cms.server.componentmanager.*;
7 > import uk.org.iscream.cms.server.clientinterface.*;
8 > import uk.org.iscream.cms.server.util.*;
9  
10   /**
11   * A ClientInterface wrapper - the CI objects are pushed data,
# Line 34 | Line 35 | public class CIWrapper extends Thread {
35       * @param queue a reference to a queue to use
36       */
37      public CIWrapper(ClientInterface destination, Queue queue){
38 +        // set the Thread name
39 +        setName("rootfilter.CIWrapper");
40 +        
41          _destination = destination;
42          _queue = queue;
43 +        _queueID = queue.getQueue();
44      }
45  
46   //---PUBLIC METHODS---
# Line 44 | Line 49 | public class CIWrapper extends Thread {
49       * start the thread and thus gets and sends data
50       */
51      public void run() {
52 <        int n = _queue.getQueue();
52 >        String xml = null;
53          while(true) {
54              try {
55 <                String xml = _queue.get(n)
55 >                xml = (String) _queue.get(_queueID);
56              }
57              catch (InvalidQueueException e) {
58                  _logger.write(toString(), Logger.ERROR, "Queue error: "+e);
# Line 60 | Line 65 | public class CIWrapper extends Thread {
65       * Overrides the {@link java.lang.Object#toString() Object.toString()}
66       * method to provide clean logging (every class should have this).
67       *
68 +     * This uses the uk.org.iscream.cms.server.util.NameFormat class
69 +     * to format the toString()
70 +     *
71       * @return the name of this class and its CVS revision
72       */
73      public String toString() {
74 <        return this.getClass().getName() + "{" + _name + "}(" + REVISION.substring(11, REVISION.length() - 2) + ")";
74 >        return FormatName.getName(
75 >            _name,
76 >            getClass().getName(),
77 >            REVISION);
78      }
79  
80   //---PRIVATE METHODS---
# Line 76 | Line 87 | public class CIWrapper extends Thread {
87       * A reference to a Queue object.
88       */
89      private Queue _queue;
90 +    
91 +    /**
92 +     * Our Queue id.
93 +     */
94 +    private int _queueID;
95      
96      /**
97       * the interface this thread is sending data to

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines