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/FilterServant.java
(Generate patch)

Comparing projects/cms/source/server/uk/org/iscream/cms/server/filter/FilterServant.java (file contents):
Revision 1.14 by tdb, Sun Jan 28 05:23:23 2001 UTC vs.
Revision 1.18 by tdb, Tue May 29 17:02:35 2001 UTC

# Line 1 | Line 1
1   //---PACKAGE DECLARATION---
2 < package uk.ac.ukc.iscream.filter;
2 > package uk.org.iscream.cms.server.filter;
3  
4   //---IMPORTS---
5 < import uk.ac.ukc.iscream.core.*;
6 < import uk.ac.ukc.iscream.componentmanager.*;
7 < import uk.ac.ukc.iscream.filter.*;
8 < 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.filter.*;
8 > import uk.org.iscream.cms.server.util.*;
9   import java.net.InetAddress;
10  
11   /**
# Line 34 | Line 34 | class FilterServant extends FilterPOA {
34       * @param UDPListenPort the UDP port this filter is listening on
35       * @param queue the Queue this filter is using
36       */
37 <    public FilterServant(int TCPListenPort, int UDPListenPort, Queue queue) {    
37 >    public FilterServant(int TCPListenPort, int UDPListenPort, Queue queue) {
38          _TCPListenPort = TCPListenPort;
39          _UDPListenPort = UDPListenPort;
40          _queue = queue;
41 +        _logger.write(toString(), Logger.SYSINIT, "started");
42      }
43      
44   //---PUBLIC METHODS---
# Line 55 | Line 56 | class FilterServant extends FilterPOA {
56       * Overrides the {@link java.lang.Object#toString() Object.toString()}
57       * method to provide clean logging (every class should have this).
58       *
59 <     * This uses the uk.ac.ukc.iscream.util.NameFormat class
59 >     * This uses the uk.org.iscream.cms.server.util.NameFormat class
60       * to format the toString()
61       *
62       * @return the name of this class and its CVS revision
# Line 90 | Line 91 | class FilterServant extends FilterPOA {
91       */
92      public String getHostName() {
93          try {
94 <            return InetAddress.getLocalHost().getHostName();
94 >            // hacky fix for windows boxes, where getHostName() returns the NetBIOS name !
95 >            return InetAddress.getByName(InetAddress.getLocalHost().getHostAddress()).getHostName();
96          } catch (java.net.UnknownHostException e) {
97              _logger.write(toString(), Logger.ERROR, e.getMessage());
98          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines