org.opengts.util
Class RemoteLogServer

java.lang.Object
  extended by org.opengts.util.RemoteLogServer

public class RemoteLogServer
extends java.lang.Object

Remote Log server


Nested Class Summary
 class RemoteLogServer.RemoteLogHandler
           
 
Field Summary
static java.lang.String LOG_OUTPUT_BEGIN
           
static java.lang.String LOG_OUTPUT_END
           
static java.lang.String VERSION
           
 
Constructor Summary
RemoteLogServer(java.net.InetAddress bindAddr, int port, CachedLogOutputStream clos)
          Constructor
RemoteLogServer(int port, CachedLogOutputStream clos)
          Constructor
RemoteLogServer(java.lang.String bindHost, int port, CachedLogOutputStream clos)
          Constructor
 
Method Summary
 java.net.InetAddress getBindAddress()
          Gets the local network interface on which this server will be bound.
static CachedLogOutputStream GetCachedLogOutputStream(boolean allowTest)
           
 java.lang.String getHeader()
          Gets the header to use for remote access
 int getListenPort()
          Gets the port on which this server listens for incoming connection requests.
static java.net.InetAddress GetLocalBindAddress(java.lang.String bindHost)
          Returns the InetAddress for the specified 'bindHost'
 boolean hasHeader()
          Returns true if a header is defined
static void main(java.lang.String[] argv)
           
 void setHeader(java.lang.String h)
          Sets the header to use for remote access
 boolean startServer()
          Starts the remote log server
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final java.lang.String VERSION
See Also:
Constant Field Values

LOG_OUTPUT_BEGIN

public static final java.lang.String LOG_OUTPUT_BEGIN
See Also:
Constant Field Values

LOG_OUTPUT_END

public static final java.lang.String LOG_OUTPUT_END
See Also:
Constant Field Values
Constructor Detail

RemoteLogServer

public RemoteLogServer(int port,
                       CachedLogOutputStream clos)
Constructor

Parameters:
port - The port on which this server listens for incoming connection requests.
clos - The CachedLogOutputStream instance that contains the log buffer

RemoteLogServer

public RemoteLogServer(java.lang.String bindHost,
                       int port,
                       CachedLogOutputStream clos)
Constructor

Parameters:
bindHost - The local network interface on which this server will be bound.
port - The port on which this server listens for incoming connection requests.
clos - The CachedLogOutputStream instance that contains the log buffer

RemoteLogServer

public RemoteLogServer(java.net.InetAddress bindAddr,
                       int port,
                       CachedLogOutputStream clos)
Constructor

Parameters:
bindAddr - The local network interface on which this server will be bound.
port - The port on which this server listens for incoming connection requests.
clos - The CachedLogOutputStream instance that contains the log buffer
Method Detail

GetLocalBindAddress

public static java.net.InetAddress GetLocalBindAddress(java.lang.String bindHost)
Returns the InetAddress for the specified 'bindHost'

Parameters:
bindHost - The bind host name
Returns:
The InetAddress for the specified host, or null if the specified bind host name is not found in the local NetworkInterface addresses.

getBindAddress

public java.net.InetAddress getBindAddress()
Gets the local network interface on which this server will be bound. May be null to indicate that the default bind address should be used.

Returns:
The local network interface on which this server will be bound.

getListenPort

public int getListenPort()
Gets the port on which this server listens for incoming connection requests.

Returns:
The port on which this server listens for incoming connection requests.

setHeader

public void setHeader(java.lang.String h)
Sets the header to use for remote access

Parameters:
h - The header string

getHeader

public java.lang.String getHeader()
Gets the header to use for remote access

Returns:
The header string

hasHeader

public boolean hasHeader()
Returns true if a header is defined

Returns:
True if a header is defined

startServer

public boolean startServer()
Starts the remote log server


GetCachedLogOutputStream

public static CachedLogOutputStream GetCachedLogOutputStream(boolean allowTest)

main

public static void main(java.lang.String[] argv)