Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.pptp_gui.util
Class ConnectionHandler  view ConnectionHandler download ConnectionHandler.java

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.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 Class Summary
 
Nested classes inherited from class java.lang.Thread
java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  java.lang.String[] connectCmd
           
private  boolean connecting
           
private  int ctr
           
private  org.pptp_gui.ui.dialog.Connection frame
           
 java.lang.String pppOut
           
private  PreferencesHandler prefsHandler
           
private  java.util.Vector[] routeCmd
           
private  int status
          Status of current process.
private  boolean verbose
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ConnectionHandler(org.pptp_gui.ui.dialog.Connection f, boolean c)
          Creates a new instance of ConnectionHandler
 
Method Summary
private  void connect()
           
private  void disconnect()
           
static java.lang.String getConnectIP(java.lang.String ifconfig)
          Retrieve the IP address of the current connection
 int getStatus()
           
 void run()
          The method of Thread that will be run if there is no Runnable object associated with the Thread.
private  void runRouteCmd()
           
 void setConnectCmd(java.lang.String[] cmd)
          The command which gets issued to connect the PPTP tunnel
 void setPrefsHandler(PreferencesHandler h)
          Set the PreferencesHandler for this class
 void setRouteCmd(java.util.Vector[] cmd)
          A Vector of commands to add routes to the routing table after a PPTP connection is made.
 void setVerbose(boolean v)
          Enables or disables verbose output for connections.
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

ConnectionHandler

public ConnectionHandler(org.pptp_gui.ui.dialog.Connection f,
                         boolean c)
Creates a new instance of ConnectionHandler

Method Detail

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