org.emboss.jemboss
Class JembossParams

java.lang.Object
  extended byorg.emboss.jemboss.JembossParams

public class JembossParams
extends java.lang.Object

Contains all property information about the client and the server.


Field Summary
private  java.lang.String acdDirToParse
          acd file location
private  java.lang.String acdDirToParseName
          property name for acd file location
private  java.lang.String browserProxyHost
          browser proxy host
private  java.lang.String browserProxyHostName
          property name for browser proxy host
private  int browserProxyPort
          browser proxy port
private  java.lang.String browserProxyPortName
          property name for browser proxy port
private  java.lang.String currentMode
          current mode for running an application
private  java.lang.String currentModeName
          property name for current mode
private static java.lang.String cygwin
          cygwin
private  java.lang.String cygwinName
          property name for Jemboss java server
private  boolean debug
           
private  java.lang.String debugName
           
private  java.lang.String embossBin
          emboss binary location
private  java.lang.String embossBinName
          property name for emboss binary location
private  java.lang.String embossData
          emboss data location
private  java.lang.String embossDataName
          property name for emboss data location
private  java.lang.String embossEnvironment
          emboss environment
private  java.lang.String embossEnvironmentName
          property name for emboss environment
private  java.lang.String embossPath
          emboss path environment variable
private  java.lang.String embossPathName
          property name for emboss path environment variable
private  java.lang.String embossURL
          property name for documentation URL
private  java.lang.String embURL
          documentation URL
private  boolean hasBatchMode
          batch mode support
private  java.lang.String hasBatchModeName
          property name for batch mode support
private  boolean hasInteractiveMode
          interactive mode support
private  java.lang.String hasInteractiveModeName
          property name for interactive mode support
private  java.lang.String javaNoProxy
           
private  java.util.Vector javaNoProxyEntries
           
private  java.lang.String javaProxyHost
           
private  java.lang.String javaProxyPort
           
private  int javaProxyPortNum
           
private static boolean jembossServer
          Jemboss java server
private  java.lang.String jembossServerName
          property name for Jemboss java server
(package private)  java.util.Properties jembossSettings
           
private  java.lang.String plplot
          plplot library location
private  java.lang.String plplotName
          property name for plplot library location
private  boolean privateServerFailOver
           
private  java.util.Vector privateServers
           
private  java.lang.String privateSoapService
          private service name
private  java.lang.String privateSoapServiceName
          property name for private service name
private  java.lang.String privateSoapURL
          private services URL
private  java.lang.String privateSoapURLName
          property name for private services URL
private  java.lang.String proxyAuthPasswd
           
private  java.lang.String proxyAuthPasswdName
           
private  java.lang.String proxyAuthUser
           
private  java.lang.String proxyAuthUserName
           
private  java.lang.String proxyHost
           
private  java.lang.String proxyHostName
           
private  boolean proxyOverride
           
private  java.lang.String proxyOverrideName
           
private  int proxyPortNum
           
private  java.lang.String proxyPortNumName
           
private  boolean publicServerFailOver
           
private  java.util.Vector publicServers
           
private  java.lang.String publicSoapService
          public service name
private  java.lang.String publicSoapServiceName
          property name for public service name
private  java.lang.String publicSoapURL
          public services URL
private  java.lang.String publicSoapURLName
          property name for public services URL
static int SERVER_DOWN
          denotes a server is not responding
static int SERVER_ERR
          denotes a server is giving errors
static int SERVER_OK
          denotes a server is OK
private  java.lang.String serverPrivateList
           
private  java.lang.String serverPrivateListName
           
private  java.lang.String serverPublicList
           
private  java.lang.String serverPublicListName
           
private  java.util.Hashtable serverStatusHash
           
private  char[] servicePasswd
           
private  byte[] servicePasswdByte
          services password
private  java.lang.String serviceUserName
           
private  java.lang.String serviceUserNameName
           
private  java.lang.String soapService
          service name
private  java.lang.String soapServiceName
          property name for service name
private  boolean useAuth
          use unix authentication to run applications on the server
private  java.lang.String useAuthName
          property name for using unix authentication
private  boolean useBrowserProxy
          use a separate proxy for browsing the web
private  java.lang.String useBrowserProxyName
          property name for using separate proxy for browsing the web
private  boolean useHTTPSProxy
           
private  java.lang.String useHTTPSProxyName
           
private  boolean useJavaNoProxy
           
private  boolean useJavaProxy
           
private  boolean useProxy
           
private  boolean useProxyAuth
          use proxy authentication
private  java.lang.String useProxyAuthName
          property name for using proxy authentication
private  java.lang.String useProxyName
           
private  java.lang.String userHome
          user home directory
private  java.lang.String userHomeName
          property name for user home directory
private  boolean useTFM
           
private  java.lang.String useTFMName
           
 
Constructor Summary
JembossParams()
          Loads and holds the properties
 
Method Summary
 java.lang.String getAcdDirToParse()
          Acd file location
 java.lang.String getBrowserProxyHost()
          Get the name of the proxy server for the browser
 int getBrowserProxyPort()
          The port number of the proxy server for the browser
 java.lang.String getCurrentMode()
          The current mode (interactive or batch).
 java.lang.String getCygwinRoot()
          Get the cygwin root
 boolean getDebug()
          Whether to show debugging information
 java.lang.String getEmbossBin()
           
 java.lang.String getEmbossData()
           
 java.lang.String getEmbossEnvironment()
          Get the environment for emboss
 java.lang.String[] getEmbossEnvironmentArray(java.lang.String[] envp)
          Get the emboss environment as a String array
 java.lang.String getEmbossPath()
          Get the path for emboss
 java.lang.String getembURL()
           
 boolean getHasBatchMode()
          Whether this service supports batch mode
 boolean getHasInteractiveMode()
          Whether this service supports interactive mode
 java.lang.String getPlplot()
          Get the location of plplot
 boolean getPrivateServerFailover()
          Return whether we have failover on the private server
 java.util.Vector getPrivateServers()
          Return a vector containing the list of private servers
 java.lang.String getPrivateSoapService()
          Get the name of the private soap service
 java.lang.String getPrivateSoapURL()
          Returns the URL of the private soap server
 java.lang.String getProxyAuthPasswd()
          Password needed to use for the proxy server
 java.lang.String getProxyAuthUser()
          Username needed to use for the proxy server
 java.lang.String getProxyHost()
          The name of the proxy server
 int getProxyPortNum()
          The port the proxy server listens on
 boolean getPublicServerFailover()
          Return whether we have failover on the public server
 java.util.Vector getPublicServers()
          Return a vector containing the list of public servers
 java.lang.String getPublicSoapService()
          Get the name of the public soap service we're using
 java.lang.String getPublicSoapURL()
          Returns the URL of the public soap server
 char[] getServicePasswd()
          Return the password needed for the remote service
 byte[] getServicePasswdByte()
          Return the password needed for the remote service
 java.lang.String getServiceUserName()
          Return the username needed for the remote service
 java.lang.String getSoapService()
          Get the name of the soap service
 boolean getUseAuth()
          Whether the main service requires authentication
 boolean getUseHTTPSProxy()
          If using an https proxy server
 boolean getUseProxy()
          If using a proxy server
 boolean getUseProxy(java.lang.String s)
          If using a proxy server for a given URL
 boolean getUseProxyAuth()
          If using authenticate with the proxy
 java.lang.String getUserHome()
          Get the user home directory
 boolean isBrowserProxy()
          Determine if the a proxy server is being used for web browsing
static boolean isCygwin()
           
static boolean isJembossServer()
           
 boolean isUseTFM()
           
private  void loadIn(java.lang.String folder)
          Load a property from the jemboss.property file.
 java.util.Vector modeVector()
          Return the mode list as a vector, suitable for loading into a combobox.
 java.lang.String proxyDescription()
          A description of the proxy settings
 java.lang.String serverDescription()
          A description of the server settings
 void setCurrentMode(java.lang.String newMode)
          Set the current mode (interactive or batch).
 void setPrivateSoapService(java.lang.String s)
          Set the name of the private soap service
 void setPrivateSoapURL(java.lang.String s)
          Set the URL of the private soap server
 void setPublicSoapService(java.lang.String s)
          Set the name of the public soap service we're using
 void setPublicSoapURL(java.lang.String s)
          Set the URL of the public soap server
 void setServerStatus(java.lang.String server, int i)
          Mark a server as bad
 void setServicePasswd(char[] newPasswd)
          Save the password needed for the remote service
 void setServiceUserName(java.lang.String newUserName)
          Save the username needed for the remote service
protected  void setupServerRedundancy()
          Initialize the server redundancy data.
 void setUserHome(java.lang.String s)
          Set the user home directory property
private static byte[] toByteArr(char[] ch)
          Return the password as byte array
 void updateJembossProperty(java.lang.String name, java.lang.String newvalue)
          Update the properties structure.
 void updateJembossPropHash(java.util.Hashtable hash)
          Update properties from a Hashtable
 void updateJembossPropString(java.lang.String entry)
          Parse a key=value string to update the properties structure
 void updateJembossPropStrings(java.lang.String[] entries)
          Parse an array of key=value strings to update the properties structure
protected  void updateSettingsFromProperties()
          Update the property settings for jembossSettings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVER_OK

public static final int SERVER_OK
denotes a server is OK

See Also:
Constant Field Values

SERVER_ERR

public static final int SERVER_ERR
denotes a server is giving errors

See Also:
Constant Field Values

SERVER_DOWN

public static final int SERVER_DOWN
denotes a server is not responding

See Also:
Constant Field Values

useHTTPSProxy

private boolean useHTTPSProxy

useHTTPSProxyName

private java.lang.String useHTTPSProxyName

useProxy

private boolean useProxy

useProxyName

private java.lang.String useProxyName

proxyHost

private java.lang.String proxyHost

proxyHostName

private java.lang.String proxyHostName

proxyPortNum

private int proxyPortNum

proxyPortNumName

private java.lang.String proxyPortNumName

useBrowserProxy

private boolean useBrowserProxy
use a separate proxy for browsing the web


useBrowserProxyName

private java.lang.String useBrowserProxyName
property name for using separate proxy for browsing the web


browserProxyHost

private java.lang.String browserProxyHost
browser proxy host


browserProxyHostName

private java.lang.String browserProxyHostName
property name for browser proxy host


browserProxyPort

private int browserProxyPort
browser proxy port


browserProxyPortName

private java.lang.String browserProxyPortName
property name for browser proxy port


useTFM

private boolean useTFM

useTFMName

private java.lang.String useTFMName

useProxyAuth

private boolean useProxyAuth
use proxy authentication


useProxyAuthName

private java.lang.String useProxyAuthName
property name for using proxy authentication


proxyAuthUser

private java.lang.String proxyAuthUser

proxyAuthUserName

private java.lang.String proxyAuthUserName

proxyAuthPasswd

private java.lang.String proxyAuthPasswd

proxyAuthPasswdName

private java.lang.String proxyAuthPasswdName

proxyOverride

private boolean proxyOverride

proxyOverrideName

private java.lang.String proxyOverrideName

useAuth

private boolean useAuth
use unix authentication to run applications on the server


useAuthName

private java.lang.String useAuthName
property name for using unix authentication


publicSoapURL

private java.lang.String publicSoapURL
public services URL


publicSoapURLName

private java.lang.String publicSoapURLName
property name for public services URL


privateSoapURL

private java.lang.String privateSoapURL
private services URL


privateSoapURLName

private java.lang.String privateSoapURLName
property name for private services URL


soapService

private java.lang.String soapService
service name


soapServiceName

private java.lang.String soapServiceName
property name for service name


privateSoapService

private java.lang.String privateSoapService
private service name


privateSoapServiceName

private java.lang.String privateSoapServiceName
property name for private service name


publicSoapService

private java.lang.String publicSoapService
public service name


publicSoapServiceName

private java.lang.String publicSoapServiceName
property name for public service name


debug

private boolean debug

debugName

private java.lang.String debugName

hasBatchMode

private boolean hasBatchMode
batch mode support


hasBatchModeName

private java.lang.String hasBatchModeName
property name for batch mode support


hasInteractiveMode

private boolean hasInteractiveMode
interactive mode support


hasInteractiveModeName

private java.lang.String hasInteractiveModeName
property name for interactive mode support


currentMode

private java.lang.String currentMode
current mode for running an application


currentModeName

private java.lang.String currentModeName
property name for current mode


serverPublicList

private java.lang.String serverPublicList

serverPublicListName

private java.lang.String serverPublicListName

serverPrivateList

private java.lang.String serverPrivateList

serverPrivateListName

private java.lang.String serverPrivateListName

serviceUserName

private java.lang.String serviceUserName

serviceUserNameName

private java.lang.String serviceUserNameName

servicePasswd

private char[] servicePasswd

servicePasswdByte

private byte[] servicePasswdByte
services password


jembossSettings

java.util.Properties jembossSettings

useJavaProxy

private boolean useJavaProxy

javaProxyPort

private java.lang.String javaProxyPort

javaProxyHost

private java.lang.String javaProxyHost

useJavaNoProxy

private boolean useJavaNoProxy

javaNoProxy

private java.lang.String javaNoProxy

javaNoProxyEntries

private java.util.Vector javaNoProxyEntries

javaProxyPortNum

private int javaProxyPortNum

publicServerFailOver

private boolean publicServerFailOver

privateServerFailOver

private boolean privateServerFailOver

serverStatusHash

private java.util.Hashtable serverStatusHash

publicServers

private java.util.Vector publicServers

privateServers

private java.util.Vector privateServers

jembossServer

private static boolean jembossServer
Jemboss java server


jembossServerName

private java.lang.String jembossServerName
property name for Jemboss java server


cygwin

private static java.lang.String cygwin
cygwin


cygwinName

private java.lang.String cygwinName
property name for Jemboss java server


plplot

private java.lang.String plplot
plplot library location


plplotName

private java.lang.String plplotName
property name for plplot library location


embossData

private java.lang.String embossData
emboss data location


embossDataName

private java.lang.String embossDataName
property name for emboss data location


embossBin

private java.lang.String embossBin
emboss binary location


embossBinName

private java.lang.String embossBinName
property name for emboss binary location


embossPath

private java.lang.String embossPath
emboss path environment variable


embossPathName

private java.lang.String embossPathName
property name for emboss path environment variable


embossEnvironment

private java.lang.String embossEnvironment
emboss environment


embossEnvironmentName

private java.lang.String embossEnvironmentName
property name for emboss environment


acdDirToParse

private java.lang.String acdDirToParse
acd file location


acdDirToParseName

private java.lang.String acdDirToParseName
property name for acd file location


embURL

private java.lang.String embURL
documentation URL


embossURL

private java.lang.String embossURL
property name for documentation URL


userHome

private java.lang.String userHome
user home directory


userHomeName

private java.lang.String userHomeName
property name for user home directory

Constructor Detail

JembossParams

public JembossParams()
Loads and holds the properties

Method Detail

loadIn

private void loadIn(java.lang.String folder)
Load a property from the jemboss.property file.

Parameters:
folder - location of jemboss.property

updateSettingsFromProperties

protected void updateSettingsFromProperties()
Update the property settings for jembossSettings.


setupServerRedundancy

protected void setupServerRedundancy()
Initialize the server redundancy data. This is a separate method because the server info might not be initialized in the constructor, but may be imported later from the command line.


getUseProxy

public boolean getUseProxy()
If using a proxy server


getUseHTTPSProxy

public boolean getUseHTTPSProxy()
If using an https proxy server


getUseProxy

public boolean getUseProxy(java.lang.String s)
If using a proxy server for a given URL

Parameters:
s - the URL we wish to connect to

getProxyHost

public java.lang.String getProxyHost()
The name of the proxy server

Returns:
name of the proxy host

getProxyPortNum

public int getProxyPortNum()
The port the proxy server listens on

Returns:
proxy port number

isBrowserProxy

public boolean isBrowserProxy()
Determine if the a proxy server is being used for web browsing

Returns:
true if using a proxy server for the browser

getBrowserProxyHost

public java.lang.String getBrowserProxyHost()
Get the name of the proxy server for the browser

Returns:
the name of the proxy host

getBrowserProxyPort

public int getBrowserProxyPort()
The port number of the proxy server for the browser

Returns:
proxy port number

isUseTFM

public boolean isUseTFM()

getUseProxyAuth

public boolean getUseProxyAuth()
If using authenticate with the proxy

Returns:
true if unix authentication used

getProxyAuthUser

public java.lang.String getProxyAuthUser()
Username needed to use for the proxy server


getProxyAuthPasswd

public java.lang.String getProxyAuthPasswd()
Password needed to use for the proxy server


proxyDescription

public java.lang.String proxyDescription()
A description of the proxy settings

Returns:
a description of the proxy settings

getUseAuth

public boolean getUseAuth()
Whether the main service requires authentication

Returns:
true if the server is using unix authentication

getPublicSoapURL

public java.lang.String getPublicSoapURL()
Returns the URL of the public soap server

Returns:
the public services URL

isJembossServer

public static boolean isJembossServer()
Returns:
true if using a Jemboss server

isCygwin

public static boolean isCygwin()
Returns:
true if using cygwin

getCygwinRoot

public java.lang.String getCygwinRoot()
Get the cygwin root

Returns:
cygwin root

getPlplot

public java.lang.String getPlplot()
Get the location of plplot

Returns:
the location of plplot

getUserHome

public java.lang.String getUserHome()
Get the user home directory

Returns:
the user home directory

setUserHome

public void setUserHome(java.lang.String s)
Set the user home directory property

Parameters:
s - the user home directory

getembURL

public java.lang.String getembURL()
Returns:
the documentation URL

getEmbossData

public java.lang.String getEmbossData()
Returns:
the location of the emboss data

getEmbossBin

public java.lang.String getEmbossBin()
Returns:
the location of the emboss binaries

getEmbossPath

public java.lang.String getEmbossPath()
Get the path for emboss

Returns:
the path for emboss

getEmbossEnvironment

public java.lang.String getEmbossEnvironment()
Get the environment for emboss

Returns:
the environment for emboss

getEmbossEnvironmentArray

public java.lang.String[] getEmbossEnvironmentArray(java.lang.String[] envp)
Get the emboss environment as a String array

Returns:
the emboss environment as a String array

getAcdDirToParse

public java.lang.String getAcdDirToParse()
Acd file location

Returns:
acd file location

setPublicSoapURL

public void setPublicSoapURL(java.lang.String s)
Set the URL of the public soap server

Parameters:
s - URL of the public services

getPrivateSoapURL

public java.lang.String getPrivateSoapURL()
Returns the URL of the private soap server

Returns:
URL of the private services

setPrivateSoapURL

public void setPrivateSoapURL(java.lang.String s)
Set the URL of the private soap server

Parameters:
s - URL of the private services

getPublicServerFailover

public boolean getPublicServerFailover()
Return whether we have failover on the public server


getPrivateServerFailover

public boolean getPrivateServerFailover()
Return whether we have failover on the private server


getPublicServers

public java.util.Vector getPublicServers()
Return a vector containing the list of public servers


getPrivateServers

public java.util.Vector getPrivateServers()
Return a vector containing the list of private servers


setServerStatus

public void setServerStatus(java.lang.String server,
                            int i)
Mark a server as bad


getServiceUserName

public java.lang.String getServiceUserName()
Return the username needed for the remote service

Returns:
the username

setServiceUserName

public void setServiceUserName(java.lang.String newUserName)
Save the username needed for the remote service

Parameters:
newUserName - the username

getServicePasswd

public char[] getServicePasswd()
Return the password needed for the remote service

Returns:
password

getServicePasswdByte

public byte[] getServicePasswdByte()
Return the password needed for the remote service

Returns:
password

toByteArr

private static byte[] toByteArr(char[] ch)
Return the password as byte array


setServicePasswd

public void setServicePasswd(char[] newPasswd)
Save the password needed for the remote service

Parameters:
newPasswd - the username

getSoapService

public java.lang.String getSoapService()
Get the name of the soap service

Returns:
soap service name

getPrivateSoapService

public java.lang.String getPrivateSoapService()
Get the name of the private soap service

Returns:
private service name

setPrivateSoapService

public void setPrivateSoapService(java.lang.String s)
Set the name of the private soap service

Parameters:
s - private service name

getPublicSoapService

public java.lang.String getPublicSoapService()
Get the name of the public soap service we're using

Returns:
public service name

setPublicSoapService

public void setPublicSoapService(java.lang.String s)
Set the name of the public soap service we're using

Parameters:
s - public service name

serverDescription

public java.lang.String serverDescription()
A description of the server settings

Returns:
description of the services

getDebug

public boolean getDebug()
Whether to show debugging information


getHasBatchMode

public boolean getHasBatchMode()
Whether this service supports batch mode

Returns:
true if batch mode supported

getHasInteractiveMode

public boolean getHasInteractiveMode()
Whether this service supports interactive mode

Returns:
true if interactive mode supported

getCurrentMode

public java.lang.String getCurrentMode()
The current mode (interactive or batch).

Returns:
a String containing the current mode

setCurrentMode

public void setCurrentMode(java.lang.String newMode)
Set the current mode (interactive or batch).

Parameters:
newMode - The new execution mode

modeVector

public java.util.Vector modeVector()
Return the mode list as a vector, suitable for loading into a combobox.

Returns:
mode list

updateJembossProperty

public void updateJembossProperty(java.lang.String name,
                                  java.lang.String newvalue)
Update the properties structure. This doesn't update the actual properties, just the Properties object so you must call updateSettingsFromProperties yoursefl

Parameters:
name - A String naming the property to be updated
newvalue - A String containing the new value of the property

updateJembossPropString

public void updateJembossPropString(java.lang.String entry)
Parse a key=value string to update the properties structure

Parameters:
entry - String containing a key=value message

updateJembossPropStrings

public void updateJembossPropStrings(java.lang.String[] entries)
Parse an array of key=value strings to update the properties structure

Parameters:
entries - Array of Strings containing key=value messages

updateJembossPropHash

public void updateJembossPropHash(java.util.Hashtable hash)
Update properties from a Hashtable

Parameters:
hash - Hashtable containg properties