javatunnel
Class Configuration

java.lang.Object
  |
  +--javatunnel.Configuration

public class Configuration
extends java.lang.Object

JavaTunnel Copyright (C) 2002 Andrés Ederra This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


Field Summary
static int BUFFERSIZE
           
static int MODE_GNUHTTPTUNNEL
           
static java.lang.String MODE_GNUHTTPTUNNEL_STRING
           
static int MODE_HTTP
           
static java.lang.String MODE_HTTP_STRING
           
static int MODE_HTTPPROXY
           
static java.lang.String MODE_HTTPPROXY_STRING
           
static int mode_index
           
static int MODE_REDIRECT
           
static java.lang.String MODE_REDIRECT_STRING
           
static int MODE_SSL
           
static java.lang.String MODE_SSL_STRING
           
static int THREADPOOL_SIZE
           
 
Constructor Summary
Configuration()
           
Configuration(java.lang.String configFile)
           
Configuration(java.lang.String destinationAddress, int destinationPort, int localPort)
           
Configuration(java.lang.String destinationAddress, int destinationPort, java.lang.String proxyAddress, int proxyPort, int localPort)
           
Configuration(java.lang.String destinationAddress, int destinationPort, java.lang.String proxyAddress, int proxyPort, java.lang.String serverAddress, int serverPort, int localPort)
           
 
Method Summary
 java.lang.String getDestinationAddress()
          Returns the destinationAddress.
 int getDestinationPort()
          Gets the destinationPort.
 int getLocalPort()
          Gets the localPort.
 int getMode()
          Returns the mode.
static java.lang.String getModeString(int modeInt)
           
 java.lang.String getProxyAddress()
           
 int getProxyPort()
          Returns the proxyPort.
 java.lang.String getServerAddress()
          Returns the serverAddress.
 int getServerPort()
          Returns the serverPort.
 boolean getUseProxy()
          Gets the useProxy.
 boolean isLibMode()
           
 boolean isManageHostsFile()
           
 boolean isUseProxy()
          Returns the useProxy.
 void setDestinationAddress(java.lang.String destinationAddress)
          Sets the destinationAddress.
 void setDestinationPort(int destinationPort)
          Sets the destinationPort.
 void setLibMode(boolean libMode)
           
 void setLocalPort(int localPort)
          Sets the localPort.
 void setManageHostsFile(boolean manageHostFile)
           
 void setMode(int mode)
          Sets the mode.
 void setMode(java.lang.String mode)
          Sets the mode.
 void setProxyAddress(java.lang.String proxyAddress)
           
 void setProxyPort(int proxyPort)
          Sets the proxyPort.
 void setServerAddress(java.lang.String serverAddress)
          Sets the serverAddress.
 void setServerPort(int serverPort)
          Sets the serverPort.
 void setUseProxy(boolean useProxy)
          Sets the useProxy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mode_index

public static final int mode_index
See Also:
Constant Field Values

MODE_REDIRECT

public static final int MODE_REDIRECT
See Also:
Constant Field Values

MODE_REDIRECT_STRING

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

MODE_SSL

public static final int MODE_SSL
See Also:
Constant Field Values

MODE_SSL_STRING

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

MODE_HTTP

public static final int MODE_HTTP
See Also:
Constant Field Values

MODE_HTTP_STRING

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

MODE_HTTPPROXY

public static final int MODE_HTTPPROXY
See Also:
Constant Field Values

MODE_HTTPPROXY_STRING

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

MODE_GNUHTTPTUNNEL

public static final int MODE_GNUHTTPTUNNEL
See Also:
Constant Field Values

MODE_GNUHTTPTUNNEL_STRING

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

BUFFERSIZE

public static int BUFFERSIZE

THREADPOOL_SIZE

public static int THREADPOOL_SIZE
Constructor Detail

Configuration

public Configuration(java.lang.String configFile)

Configuration

public Configuration(java.lang.String destinationAddress,
                     int destinationPort,
                     java.lang.String proxyAddress,
                     int proxyPort,
                     int localPort)

Configuration

public Configuration(java.lang.String destinationAddress,
                     int destinationPort,
                     java.lang.String proxyAddress,
                     int proxyPort,
                     java.lang.String serverAddress,
                     int serverPort,
                     int localPort)

Configuration

public Configuration(java.lang.String destinationAddress,
                     int destinationPort,
                     int localPort)

Configuration

public Configuration()
Method Detail

getDestinationPort

public int getDestinationPort()
Gets the destinationPort.

Returns:
Returns a int

setDestinationPort

public void setDestinationPort(int destinationPort)
Sets the destinationPort.

Parameters:
destinationPort - The destinationPort to set

getLocalPort

public int getLocalPort()
Gets the localPort.

Returns:
Returns a int

setLocalPort

public void setLocalPort(int localPort)
Sets the localPort.

Parameters:
localPort - The localPort to set

getUseProxy

public boolean getUseProxy()
Gets the useProxy.

Returns:
Returns a boolean

setUseProxy

public void setUseProxy(boolean useProxy)
Sets the useProxy.

Parameters:
useProxy - The useProxy to set

setProxyAddress

public void setProxyAddress(java.lang.String proxyAddress)

getProxyAddress

public java.lang.String getProxyAddress()

getDestinationAddress

public java.lang.String getDestinationAddress()
Returns the destinationAddress.

Returns:
String

getProxyPort

public int getProxyPort()
Returns the proxyPort.

Returns:
int

getServerPort

public int getServerPort()
Returns the serverPort.

Returns:
int

isUseProxy

public boolean isUseProxy()
Returns the useProxy.

Returns:
boolean

setDestinationAddress

public void setDestinationAddress(java.lang.String destinationAddress)
Sets the destinationAddress.

Parameters:
destinationAddress - The destinationAddress to set

setProxyPort

public void setProxyPort(int proxyPort)
Sets the proxyPort.

Parameters:
proxyPort - The proxyPort to set

setServerPort

public void setServerPort(int serverPort)
Sets the serverPort.

Parameters:
serverPort - The serverPort to set

getServerAddress

public java.lang.String getServerAddress()
Returns the serverAddress.

Returns:
String

setServerAddress

public void setServerAddress(java.lang.String serverAddress)
Sets the serverAddress.

Parameters:
serverAddress - The serverAddress to set

getMode

public int getMode()
Returns the mode.

Returns:
int

setMode

public void setMode(int mode)
Sets the mode.

Parameters:
mode - The mode to set

setMode

public void setMode(java.lang.String mode)
Sets the mode.

Parameters:
mode - The mode to set

isManageHostsFile

public boolean isManageHostsFile()
Returns:
Returns the manageHostFile.

setManageHostsFile

public void setManageHostsFile(boolean manageHostFile)
Parameters:
manageHostFile - The manageHostFile to set.

getModeString

public static java.lang.String getModeString(int modeInt)

isLibMode

public boolean isLibMode()
Returns:
Returns the libMode.

setLibMode

public void setLibMode(boolean libMode)
Parameters:
libMode - The libMode to set.