java.lang.Object
java.lang.Thread
org.pptp_gui.util.ConnectionHandler
- All Implemented Interfaces:
- java.lang.Runnable
- public class ConnectionHandler
- extends java.lang.Thread
This will connect or disconnect a VPN tunnel. It relies on external binaries of
PPTP Client (pptpclient.sourceforge.net) for the ability to connect.
- Version:
- 0.06.1
| Nested classes inherited from class java.lang.Thread |
java.lang.Thread.UncaughtExceptionHandler |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
verbose
private boolean verbose
connecting
private boolean connecting
connectCmd
private java.lang.String[] connectCmd
routeCmd
private java.util.Vector[] routeCmd
status
private int status
- Status of current process.
0 indicates successful completion
-1 indicates currently running
1 indicates failed operation
2 indicates successful pptp, but unsuccessful route
prefsHandler
private PreferencesHandler prefsHandler
frame
private org.pptp_gui.ui.dialog.Connection frame
pppOut
public java.lang.String pppOut
ctr
private int ctr
ConnectionHandler
public ConnectionHandler(org.pptp_gui.ui.dialog.Connection f,
boolean c)
- Creates a new instance of ConnectionHandler
getStatus
public int getStatus()
setConnectCmd
public void setConnectCmd(java.lang.String[] cmd)
- The command which gets issued to connect the PPTP tunnel
setRouteCmd
public void setRouteCmd(java.util.Vector[] cmd)
- A Vector of commands to add routes to the routing table after a PPTP connection is made.
setVerbose
public void setVerbose(boolean v)
- Enables or disables verbose output for connections.
setPrefsHandler
public void setPrefsHandler(PreferencesHandler h)
- Set the
PreferencesHandler for this class
connect
private void connect()
disconnect
private void disconnect()
runRouteCmd
private void runRouteCmd()
run
public void run()
- Description copied from class:
java.lang.Thread
- The method of Thread that will be run if there is no Runnable object
associated with the Thread. Thread's implementation does nothing at all.
getConnectIP
public static java.lang.String getConnectIP(java.lang.String ifconfig)
- Retrieve the IP address of the current connection