jap.forward
Class JAPRoutingEstablishForwardedConnectionDialog

java.lang.Object
  extended by jap.forward.JAPRoutingEstablishForwardedConnectionDialog

public class JAPRoutingEstablishForwardedConnectionDialog
extends java.lang.Object

This is implementation of the dialog shown when starting a forwarded connection. The dialog is asking the user some parameters and establishes the forwarded connection. Also the anonymity mode is initialized by this dialog.


Field Summary
private  boolean m_bForwardingSuccessful
           
private  java.awt.Font m_fontSetting
          Stores the default font to use within the whole dialog.
private  java.awt.Component m_parentComponent
          Stores the parent component over which all windows of this dialog are centered.
 
Constructor Summary
JAPRoutingEstablishForwardedConnectionDialog(java.awt.Component a_parentComponent)
          Creates a new JAPRoutingEstablishForwardedConnectionDialog.
JAPRoutingEstablishForwardedConnectionDialog(java.awt.Component a_parentComponent, IAddress a_address)
          Creates a new JAPRoutingEstablishForwardedConnectionDialog.
 
Method Summary
private  java.awt.Font getFontSetting()
          Returns the default font to use within the whole dialog.
private  java.awt.Component getRootComponent()
          Returns the parent component over which all windows of this dialog are centered.
 boolean isForwardingSuccessful()
           
private  boolean showConfigClientDialogAnnounceCascade(MixCascade a_selectedMixCascade)
          Shows the announce selected mixcascade box in the client configuration dialog.
private  ListenerInterface showConfigClientDialogCaptcha(IImageEncodedCaptcha a_captcha)
          Shows the "solve captcha" box in the client configuration dialog.
private  boolean showConfigClientDialogConnectToForwarder()
          Shows the connect to forwarder box in the client configuration dialog.
private  IImageEncodedCaptcha showConfigClientDialogGetForwarderInfo()
          Shows the get forwarder information from infoservice box in the client configuration dialog.
private  ForwardConnectionDescriptor showConfigClientDialogGetOffer()
          Shows the get connection offer box in the client configuration dialog.
private  MixCascade showConfigClientDialogStep2(ForwardConnectionDescriptor a_connectionDescriptor)
          Shows the second step of the client configuration dialog.
private  IImageEncodedCaptcha showConfigClientDialogViaMail()
          Shows the first step of the client configuration dialog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_bForwardingSuccessful

private boolean m_bForwardingSuccessful

m_parentComponent

private java.awt.Component m_parentComponent
Stores the parent component over which all windows of this dialog are centered.


m_fontSetting

private java.awt.Font m_fontSetting
Stores the default font to use within the whole dialog.

Constructor Detail

JAPRoutingEstablishForwardedConnectionDialog

public JAPRoutingEstablishForwardedConnectionDialog(java.awt.Component a_parentComponent)
Creates a new JAPRoutingEstablishForwardedConnectionDialog. This will create a forwarded connection and starting the anonymity mode (if possible). Only the Java-AWT event-dispatch thread should call this constructor. Any other caller will produce a freeze here.

Parameters:
a_parentComponent - The parent component over which the dialog is centered.
a_defaultFont - The default font to use within the dialog.

JAPRoutingEstablishForwardedConnectionDialog

public JAPRoutingEstablishForwardedConnectionDialog(java.awt.Component a_parentComponent,
                                                    IAddress a_address)
Creates a new JAPRoutingEstablishForwardedConnectionDialog. This will create a forwarded connection and starting the anonymity mode (if possible). No CAPATCHE Dialog will be shown, as the Address of the Forwarding Server is directly provided.

Parameters:
a_parentComponent - The parent component over which the dialog is centered.
a_address - The address of the forwarding Server
Method Detail

isForwardingSuccessful

public boolean isForwardingSuccessful()

getRootComponent

private java.awt.Component getRootComponent()
Returns the parent component over which all windows of this dialog are centered.

Returns:
The parent component of this dialog.

getFontSetting

private java.awt.Font getFontSetting()
Returns the default font to use within the whole dialog.

Returns:
The default font for this dialog.

showConfigClientDialogGetForwarderInfo

private IImageEncodedCaptcha showConfigClientDialogGetForwarderInfo()
Shows the get forwarder information from infoservice box in the client configuration dialog.

Returns:
The captcha fetched from the infoservice or null, if fetching the captcha failed (e.g. if the user pressed 'cancel').

showConfigClientDialogViaMail

private IImageEncodedCaptcha showConfigClientDialogViaMail()
Shows the first step of the client configuration dialog. This is the way to connect via the information from the mail system.

Returns:
The captcha from the parsed user input or null, if no captcha could be parsed (e.g. if the user pressed 'cancel').

showConfigClientDialogCaptcha

private ListenerInterface showConfigClientDialogCaptcha(IImageEncodedCaptcha a_captcha)
Shows the "solve captcha" box in the client configuration dialog.

Parameters:
a_captcha - The captcha to solve.
Returns:
The ListenerInterface of the forwarder (the soulution of the captcha) or null, if the user pressed 'Cancel'.

showConfigClientDialogConnectToForwarder

private boolean showConfigClientDialogConnectToForwarder()
Shows the connect to forwarder box in the client configuration dialog.

Returns:
True, if the contacting the forwarder was successful or false, if the connection to the forwarder failed.

showConfigClientDialogGetOffer

private ForwardConnectionDescriptor showConfigClientDialogGetOffer()
Shows the get connection offer box in the client configuration dialog.

Returns:
The descriptor with the connection offer from the forwarder or null, if the descriptor could not be obtained (e.g. if the user pressed 'cancel').

showConfigClientDialogStep2

private MixCascade showConfigClientDialogStep2(ForwardConnectionDescriptor a_connectionDescriptor)
Shows the second step of the client configuration dialog.

Parameters:
a_connectionDescriptor - The connection offer from the forwarder, which is visualized.
Returns:
The mixcascade selected by the user in this step or null, if he pressed 'Cancel'.

showConfigClientDialogAnnounceCascade

private boolean showConfigClientDialogAnnounceCascade(MixCascade a_selectedMixCascade)
Shows the announce selected mixcascade box in the client configuration dialog.

Parameters:
a_selectedMixCascade - The mixcascade which was selected in step 2.
Returns:
True, if announcing the cascade at the forwarder was successful or false, if it was not.