com.sshtools.profile
Interface SchemeOptions


public interface SchemeOptions

To allow each connection scheme to have its own protocol specific options, a ResourceProfile can have a single SchemeOptions implementation.

When the ResourceProfile XML file is being parsed and a SchemeOptions element is encountered, the className attribute is used to instantiate a class that implements this interface. All child elements are then passed to the instance so the it can build up its properties.

Author:
$Author: brett $

Field Summary
static int USE_HTTP_PROXY
          Connect to the host through a HTTP proxy
static int USE_SOCKS4_PROXY
          Connect to the host using a SOCKS 4 proxy
static int USE_SOCKS5_PROXY
          Connect to the host using a SOCKS 5 proxy
static int USE_SSL_EXPLORER_PROXY
          Connect to the host using an SSL-Explorer proxy
static int USE_STANDARD_SOCKET
          Standard connection - just connect directly to the host
 
Method Summary
 nanoxml.XMLElement getElement()
          Get these options as an XML element that can be persisted along with the ResourceProfile.
 int getTransportProvider()
          The type of transport to communicate over.
 void init(nanoxml.XMLElement element)
          Invoked when instantiated by the ResourceProfile parser or when creating a new profile.
 boolean isAppropriateForScheme(java.lang.String schemeName)
          Return if these options are appropriate for a scheme
 

Field Detail

USE_STANDARD_SOCKET

static final int USE_STANDARD_SOCKET
Standard connection - just connect directly to the host

See Also:
Constant Field Values

USE_HTTP_PROXY

static final int USE_HTTP_PROXY
Connect to the host through a HTTP proxy

See Also:
Constant Field Values

USE_SOCKS4_PROXY

static final int USE_SOCKS4_PROXY
Connect to the host using a SOCKS 4 proxy

See Also:
Constant Field Values

USE_SOCKS5_PROXY

static final int USE_SOCKS5_PROXY
Connect to the host using a SOCKS 5 proxy

See Also:
Constant Field Values

USE_SSL_EXPLORER_PROXY

static final int USE_SSL_EXPLORER_PROXY
Connect to the host using an SSL-Explorer proxy

See Also:
Constant Field Values
Method Detail

init

void init(nanoxml.XMLElement element)
          throws ProfileException
Invoked when instantiated by the ResourceProfile parser or when creating a new profile. If null is provided as the element, default options will be set.

Parameters:
element - SchemeOptions element
Throws:
ProfileException - if any data provided by the element is invalid

getElement

nanoxml.XMLElement getElement()
Get these options as an XML element that can be persisted along with the ResourceProfile.

Returns:
XML element for persisting along with the ResourceProfile

isAppropriateForScheme

boolean isAppropriateForScheme(java.lang.String schemeName)
Return if these options are appropriate for a scheme

Parameters:
schemeName -
Returns:
true if these options are appropriate for a scheme

getTransportProvider

int getTransportProvider()
The type of transport to communicate over. This will be one of the proxy settings defined on this interface

Returns:


Copyright © 2003-2009 SSHTOOLS LTD. All Rights Reserved.