ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/uk/org/iscream/cms/server/filter/FilterThread.java
Revision 1.41 - (view) (annotate) - [select for diffs]
Sun Sep 25 09:57:42 2005 UTC (18 years, 7 months ago) by tdb
Branch: MAIN
CVS Tags: HEAD
Changes since 1.40: +3 -3 lines
Diff to previous 1.40
Fix compile problems on j2se 1.5 - our Queue class conflicted with one in
java.util. Also fix an API issue when running the server on Windows - the
println method sends '\r\n' on Windows instead of '\n' on Unix, which
confuses applications such as ihost.

Patch provided by: skel

Revision 1.40 - (view) (annotate) - [select for diffs]
Sun Aug 1 10:40:59 2004 UTC (19 years, 9 months ago) by tdb
Branch: MAIN
Changes since 1.39: +3 -3 lines
Diff to previous 1.39
Catch a lot of old URL's and update them. Also remove a couple of old files
that aren't used.

Revision 1.39 - (view) (annotate) - [select for diffs]
Wed Feb 5 16:43:47 2003 UTC (21 years, 3 months ago) by tdb
Branch: MAIN
Changes since 1.38: +4 -4 lines
Diff to previous 1.38
Changed the server to use the external util package. Quite a minor change,
but does affect a lot of files.

Revision 1.38 - (view) (annotate) - [select for diffs]
Sat Oct 12 22:12:36 2002 UTC (21 years, 6 months ago) by tdb
Branch: MAIN
Changes since 1.37: +9 -6 lines
Diff to previous 1.37
Changed to use the XMLCache.

Revision 1.37 - (view) (annotate) - [select for diffs]
Fri Sep 6 15:10:48 2002 UTC (21 years, 8 months ago) by tdb
Branch: MAIN
Changes since 1.36: +3 -3 lines
Diff to previous 1.36
Fix for upgrade to Jacorb 1.4.1. It's our fault actually, we've not been
correctly using the names when binding to the Naming Service. This needs to
be fixed properly at some point, but for now I've changed changed the code
so it "means" the same as it did before the upgrade.

Revision 1.36 - (view) (annotate) - [select for diffs]
Tue May 21 16:47:17 2002 UTC (21 years, 11 months ago) by tdb
Branch: MAIN
Changes since 1.35: +3 -2 lines
Diff to previous 1.35
Added URL to GPL headers.

Revision 1.35 - (view) (annotate) - [select for diffs]
Sat May 18 18:16:02 2002 UTC (21 years, 11 months ago) by tdb
Branch: MAIN
Changes since 1.34: +21 -2 lines
Diff to previous 1.34
i-scream is now licensed under the GPL. I've added the GPL headers to every
source file, and put a full copy of the license in the appropriate places.
I think I've covered everything. This is going to be a mad commit ;)

Revision 1.34 - (view) (annotate) - [select for diffs]
Fri Mar 22 16:42:54 2002 UTC (22 years, 1 month ago) by tdb
Branch: MAIN
Changes since 1.33: +2 -5 lines
Diff to previous 1.33
I wonder how much cpu time this "null" statement has wasted?

Revision 1.33 - (view) (annotate) - [select for diffs]
Wed Mar 20 13:05:49 2002 UTC (22 years, 1 month ago) by tdb
Branch: MAIN
Changes since 1.32: +4 -4 lines
Diff to previous 1.32
Filter will now request the config "Filter.<name>", as opposed to just
"<name>" which it did before. The documentation suggests it should do what
it does now, and this seems the most sane thing to do.

Revision 1.32 - (view) (annotate) - [select for diffs]
Tue May 29 17:02:35 2001 UTC (22 years, 11 months ago) by tdb
Branch: MAIN
Branch point for: SERVER_PIRCBOT
Changes since 1.31: +8 -8 lines
Diff to previous 1.31
Major change in the java package naming. This has been held off for some time
now, but it really needed doing. The future packaging of all i-scream products
will be;

uk.org.iscream.<product>.<subpart>.*

In the case of the central monitoring system server this will be;

uk.org.iscream.cms.server.*

The whole server has been changed to follow this structure, and tested to a
smallish extent. Further changes in other parts of the CMS will follow.

Revision 1.31 - (view) (annotate) - [select for diffs]
Fri Mar 16 00:17:04 2001 UTC (23 years, 1 month ago) by tdb
Branch: MAIN
CVS Tags: PROJECT_COMPLETION
Changes since 1.30: +3 -3 lines
Diff to previous 1.30
Opps. Be nice if I tried to resolve the NEW name :)

Revision 1.30 - (view) (annotate) - [select for diffs]
Fri Mar 16 00:12:38 2001 UTC (23 years, 1 month ago) by tdb
Branch: MAIN
Changes since 1.29: +10 -5 lines
Diff to previous 1.29
An efficiency gain hopefully. Doing a CORBA lookup every time is a bit OTT. Now
we just lookup the name from the config, and only get the CORBA ref if it's been
changed.

Revision 1.29 - (view) (annotate) - [select for diffs]
Wed Mar 14 23:25:29 2001 UTC (23 years, 1 month ago) by tdb
Branch: MAIN
Changes since 1.28: +8 -8 lines
Diff to previous 1.28
The whole server package structure has been changed.
Old Package: uk.ac.ukc.iscream.*
New Package: uk.org.iscream.*

Revision 1.28 - (view) (annotate) - [select for diffs]
Tue Mar 13 16:25:57 2001 UTC (23 years, 1 month ago) by tdb
Branch: MAIN
Changes since 1.27: +20 -13 lines
Diff to previous 1.27
Modified to use the ConfigurationProxy. Also took the opportunity to fix some of
the issues with TCP communicates - specifically checking for nulls. This makes
the configuration more dynamic, but do note that the TCP/UDP ports are only set
on startup. This is because it would require lots of extra work to "change" the
ports that the Filter is bound to on the fly.

Revision 1.27 - (view) (annotate) - [select for diffs]
Tue Mar 13 02:19:46 2001 UTC (23 years, 1 month ago) by tdb
Branch: MAIN
Changes since 1.26: +5 -2 lines
Diff to previous 1.26
Given all the classes that extend Thread a name using Thread.setName(). It is
only representative as far as it will tell us which class the Thread is, but
this will go some way to aiding debugging. If time permitted, more effort could
be taken to name each thread according to what it was dealing with.

Revision 1.26 - (view) (annotate) - [select for diffs]
Sat Mar 10 04:03:07 2001 UTC (23 years, 1 month ago) by tdb
Branch: MAIN
Changes since 1.25: +5 -4 lines
Diff to previous 1.25
Changes due to the alterations in the XML creation code. The XMLPacketMaker now
only needs to be created once, and can then be called multiple times to create
XML packets. This should be more efficient in the long run.

Revision 1.25 - (view) (annotate) - [select for diffs]
Thu Mar 1 16:53:24 2001 UTC (23 years, 2 months ago) by tdb
Branch: MAIN
Changes since 1.24: +18 -18 lines
Diff to previous 1.24
Added a try catch section for creating the XMLPacket.

Revision 1.24 - (view) (annotate) - [select for diffs]
Mon Feb 12 00:45:57 2001 UTC (23 years, 2 months ago) by tdb
Branch: MAIN
Changes since 1.23: +4 -4 lines
Diff to previous 1.23
eek... grammer boy !

Revision 1.23 - (view) (annotate) - [select for diffs]
Mon Feb 12 00:45:33 2001 UTC (23 years, 2 months ago) by tdb
Branch: MAIN
Changes since 1.22: +4 -4 lines
Diff to previous 1.22
Obviously it wasn't XML ....

Revision 1.22 - (view) (annotate) - [select for diffs]
Mon Feb 12 00:44:44 2001 UTC (23 years, 2 months ago) by ajm
Branch: MAIN
Changes since 1.21: +12 -6 lines
Diff to previous 1.21
made it FAR more understandable for a developer to code something which sends packets through the system!
(though I couldn't compile here, so there maybe syntax errors) ;p

Revision 1.21 - (view) (annotate) - [select for diffs]
Mon Feb 12 00:36:20 2001 UTC (23 years, 2 months ago) by tdb
Branch: MAIN
Changes since 1.20: +4 -4 lines
Diff to previous 1.20
Pah... changed it and it was still wrong :P

Revision 1.20 - (view) (annotate) - [select for diffs]
Sun Feb 11 21:05:34 2001 UTC (23 years, 2 months ago) by pjm2
Branch: MAIN
Changes since 1.19: +3 -3 lines
Diff to previous 1.19
Removed the ambiguity of 'filtering' and 'rejecting' packets.

Revision 1.19 - (view) (annotate) - [select for diffs]
Thu Feb 1 00:18:42 2001 UTC (23 years, 3 months ago) by tdb
Branch: MAIN
Changes since 1.18: +3 -3 lines
Diff to previous 1.18
General tidy up, specifically focussing on the verbosity of logging messages.

Revision 1.18 - (view) (annotate) - [select for diffs]
Sun Jan 28 05:25:43 2001 UTC (23 years, 3 months ago) by tdb
Branch: MAIN
Changes since 1.17: +10 -8 lines
Diff to previous 1.17
Some tidying up.

Revision 1.17 - (view) (annotate) - [select for diffs]
Thu Jan 18 23:16:21 2001 UTC (23 years, 3 months ago) by tdb
Branch: MAIN
Changes since 1.16: +4 -3 lines
Diff to previous 1.16
Changes to reflect move of Component, ComponentStartException, and the
ReferenceManager from util to componentmanager.

Revision 1.16 - (view) (annotate) - [select for diffs]
Mon Jan 15 10:09:49 2001 UTC (23 years, 3 months ago) by pjm2
Branch: MAIN
Changes since 1.15: +14 -4 lines
Diff to previous 1.15
Each XML String now has linefeed characters removed from it.  This results
in a simplified protocol between the clientinterface and client, as well
as potentially reducing the size of each XML String.

Revision 1.15 - (view) (annotate) - [select for diffs]
Fri Jan 12 00:45:25 2001 UTC (23 years, 3 months ago) by tdb
Branch: MAIN
Changes since 1.14: +48 -44 lines
Diff to previous 1.14
A structural change to the Filter.

The old setup looked like this;

UDPReader ------> FilterThread (thread) --> (parent)
TCPReader ------> FilterThread (thread) --> (parent)
FilterServant --> FilterThread (thread) --> (parent)

Seeing this from a threaded point of view, each time a packet came in (through
whatever means - UDP, TCP or CORBA), a FilterThread instance was created to
deal with it. If the link to the parent was slow this resulting in a build-up
of FilterThreads all waiting to talk to the parent - and there is only one
actual parent object, with a synchronised thread, so they have to queue up
anyway.

As a result of this, the following change has been made.

UDPReader -------\
TCPReader ----------> Queue (single) >-- FilterThread --> (parent)
FilterServant ---/

In this setup, each of the three objects that generate packets only see the
single instance of a Queue. They all add their data to this Queue, and then
carry on with the task of listening. The FilterThread (having it's role changed
slightly) now acts as a consumer of the Queue, in that it grabs data from the
Queue and deals with passing it on to the parent.

This setup should be more efficient in the long run, especially under a high
load situation. The only problem could be the Queue growing to an unlimited
size, but this is a Queue design issue.

Revision 1.14 - (view) (annotate) - [select for diffs]
Wed Dec 13 13:36:46 2000 UTC (23 years, 4 months ago) by ajm
Branch: MAIN
Changes since 1.13: +49 -12 lines
Diff to previous 1.13
componenterized the filter and tidied all child classes, no all conform to toString standard

Revision 1.13 - (view) (annotate) - [select for diffs]
Wed Dec 6 22:57:45 2000 UTC (23 years, 4 months ago) by tdb
Branch: MAIN
Branch point for: SERVER_PACKAGEBUILD
Changes since 1.12: +12 -11 lines
Diff to previous 1.12
Added the new Plugin Manager bits.

Revision 1.12 - (view) (annotate) - [select for diffs]
Thu Nov 30 03:16:17 2000 UTC (23 years, 5 months ago) by ajm
Branch: MAIN
Changes since 1.11: +4 -6 lines
Diff to previous 1.11
removed some silly debug line that was annoying the pants off Tim!

Revision 1.11 - (view) (annotate) - [select for diffs]
Thu Nov 30 02:38:09 2000 UTC (23 years, 5 months ago) by ajm
Branch: MAIN
Changes since 1.10: +4 -5 lines
Diff to previous 1.10
Changed package structure
uk.ac.ukc.iscream.refman and xml -> uk.ac.ukc.iscream.util

Revision 1.10 - (view) (annotate) - [select for diffs]
Thu Nov 30 02:00:54 2000 UTC (23 years, 5 months ago) by tdb
Branch: MAIN
Changes since 1.9: +22 -24 lines
Diff to previous 1.9
Changed all classes so that references to the Logger and ConfigurationManager
are no longer passed around between classes. All of the classes now utilise
the new ReferenceManager, which makes life much easier.
Also tidied everything so that they all use the same conventions for attributes,
namely the _ prefix to the name.

Revision 1.9 - (view) (annotate) - [select for diffs]
Wed Nov 29 21:27:39 2000 UTC (23 years, 5 months ago) by ajm
Branch: MAIN
Changes since 1.8: +17 -9 lines
Diff to previous 1.8
Update for package move.
Fixed bug in constructors.

Revision 1.8 - (view) (annotate) - [select for diffs]
Wed Nov 29 19:26:00 2000 UTC (23 years, 5 months ago) by tdb
Branch: MAIN
Changes since 1.7: +45 -3 lines
Diff to previous 1.7
Made changes to fit into the new package structure. Also made all classes, namely
the UDPReader and FilterThread, conform to the Template class specification.

Revision 1.7 - (view) (annotate) - [select for diffs]
Mon Nov 27 21:47:13 2000 UTC (23 years, 5 months ago) by tdb
Branch: MAIN
Changes since 1.6: +1 -1 lines
Diff to previous 1.6
Yuck, a System.out.println() :)

Revision 1.6 - (view) (annotate) - [select for diffs]
Thu Nov 23 09:36:07 2000 UTC (23 years, 5 months ago) by pjm2
Branch: MAIN
Changes since 1.5: +8 -6 lines
Diff to previous 1.5
Altered the printAll() method in the XMLPacket.

Added logging facilities to XMLPacketMaker.

Revision 1.5 - (view) (annotate) - [select for diffs]
Thu Nov 23 09:21:48 2000 UTC (23 years, 5 months ago) by pjm2
Branch: MAIN
Changes since 1.4: +3 -2 lines
Diff to previous 1.4
Altered both UDPReader and FilterThread such that a reference to a Logger
is passed to the FilterThread when it is constructed.

Revision 1.4 - (view) (annotate) - [select for diffs]
Thu Nov 23 09:14:29 2000 UTC (23 years, 5 months ago) by pjm2
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3
Modified the verbosity of the Logger messages that may occur in the
UDPReader thread.

Revision 1.3 - (view) (annotate) - [select for diffs]
Thu Nov 23 09:08:07 2000 UTC (23 years, 5 months ago) by pjm2
Branch: MAIN
Changes since 1.2: +11 -13 lines
Diff to previous 1.2
Altered UDPReader and FilterThread so that the UDP packet data is now
passed via the FilterThread's constructor.

Revision 1.2 - (view) (annotate) - [select for diffs]
Wed Nov 22 09:33:52 2000 UTC (23 years, 5 months ago) by tdb
Branch: MAIN
Changes since 1.1: +13 -3 lines
Diff to previous 1.1
Added parent filter passing, so the packet can be passed on. Also had to make
a quick fix because a null pointer exception was being thrown on the substring()
part. I think this was because when a message came in over CORBA rather than UDP
it didn't have the 0 (byte 0 that is) at the end.

Revision 1.1 - (view) (annotate) - [select for diffs]
Wed Nov 22 08:40:53 2000 UTC (23 years, 5 months ago) by pjm2
Branch: MAIN
Gave the UDP and XML processing classes a new home with the filter.

UDPReaderThread has been renamed to FilterThread

XMLPacketParser has been renamed to XMLStringParser (as that's what it
does!)

Convenience Links

Links to HEAD: (view) (annotate)

Compare Revisions

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.

  Diffs between and
  Type of Diff should be a