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 |
|
/** |
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--- |
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 |
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 |
|
} |