uk.ac.mrc.hgmp.embreo
Class EmbreoParams

java.lang.Object
  |
  +--uk.ac.mrc.hgmp.embreo.EmbreoParams

public class EmbreoParams
extends java.lang.Object


Field Summary
static int PROTOCOL_CORBA
          For requests using CORBA
static int PROTOCOL_JINI
          For requests using Jini
static int PROTOCOL_JXTA
          For requests using Jxta
static int PROTOCOL_RMI
          For requests using Java RMI
static int PROTOCOL_RMI_IIOP
          For requests using RMI over IIOP
static int PROTOCOL_SOAP
          For SOAP requests via http
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
 
Constructor Summary
EmbreoParams(java.lang.String embreoAppName)
          A constructor taking the name of this particular application as an argument.
 
Method Summary
 void editFrame()
          Generates a frame that allows the user to modify selected parameters from the GUI
 java.lang.String getAppName()
          The application name we were called by
 java.lang.String getCurrentMode()
          The current mode.
 boolean getDebug()
          Whether to show debugging information
 boolean getHasAnnotation()
          Whether this service supports annotation
 boolean getHasBatchMode()
          Whether this service supports batch mode
 boolean getHasInteractiveMode()
          Whether this service supports interactive mode
 boolean getHasLocalLaunch()
          Whether this service supports local (native) application launch
 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 we're using
 java.lang.String getPrivateSoapURL()
          Returns the URL of the private soap server
 java.lang.String getProxyAuthPasswd()
          The password needed to use for the proxy server
 java.lang.String getProxyAuthUser()
          The 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
 boolean getSavedResults()
          Whether this service supports saved results
 java.lang.String getServicePasswd()
          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 we're using
 boolean getUseAuth()
          Whether the main service requires authentication
 boolean getUseProxy()
          Whether it is necessary to use a proxy server
 boolean getUseProxy(java.lang.String s)
          Whether it is necessary to use a proxy server for a given URL
 boolean getUseProxyAuth()
          Whether we have to authenticate with the proxy to use it
 boolean getUseVNC()
          Whether this service uses VNC for X display
 boolean getUseX11()
          Whether this service requires X for display
 java.lang.String getX11display()
          Get the X display name
 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.
 void setPrivateSoapService(java.lang.String s)
          Set the name of the private soap service we're using
 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(java.lang.String 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 setX11display(java.lang.String newX11display)
          Remember the X display name
 void updateEmbreoProperty(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
 void updateEmbreoPropHash(java.util.Hashtable hash)
          Update properties from a Hashtable
 void updateEmbreoPropString(java.lang.String entry)
          Parse a key=value string to update the properties structure
 void updateEmbreoPropStrings(java.lang.String[] entries)
          Parse an array of key=value strings to update the properties structure
protected  void updateSettingsFromProperties()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROTOCOL_SOAP

public static final int PROTOCOL_SOAP
For SOAP requests via http


PROTOCOL_CORBA

public static final int PROTOCOL_CORBA
For requests using CORBA


PROTOCOL_RMI

public static final int PROTOCOL_RMI
For requests using Java RMI


PROTOCOL_RMI_IIOP

public static final int PROTOCOL_RMI_IIOP
For requests using RMI over IIOP


PROTOCOL_JINI

public static final int PROTOCOL_JINI
For requests using Jini


PROTOCOL_JXTA

public static final int PROTOCOL_JXTA
For requests using Jxta


SERVER_OK

public static final int SERVER_OK
Denotes a server is OK


SERVER_ERR

public static final int SERVER_ERR
Denotes a server is giving errors


SERVER_DOWN

public static final int SERVER_DOWN
Denotes a server is not responding

Constructor Detail

EmbreoParams

public EmbreoParams(java.lang.String embreoAppName)
A constructor taking the name of this particular application as an argument. In addition to standard embreo properties, any properties specific to that application should be loaded

Parameters:
embreoAppname - The name of the current application
Method Detail

updateSettingsFromProperties

protected void updateSettingsFromProperties()

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.


getAppName

public java.lang.String getAppName()
The application name we were called by


getUseProxy

public boolean getUseProxy()
Whether it is necessary to use a proxy server


getUseProxy

public boolean getUseProxy(java.lang.String s)
Whether it is necessary to use 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


getProxyPortNum

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


getUseProxyAuth

public boolean getUseProxyAuth()
Whether we have to authenticate with the proxy to use it


getProxyAuthUser

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


getProxyAuthPasswd

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


proxyDescription

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


getUseAuth

public boolean getUseAuth()
Whether the main service requires authentication


getPublicSoapURL

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


setPublicSoapURL

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


getPrivateSoapURL

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


setPrivateSoapURL

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


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


setServiceUserName

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

Parameters:
newUserName - The username

getServicePasswd

public java.lang.String getServicePasswd()
Return the password needed for the remote service


setServicePasswd

public void setServicePasswd(java.lang.String 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 we're using


getPrivateSoapService

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


setPrivateSoapService

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

Parameters:
s - The name of the service

getPublicSoapService

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


setPublicSoapService

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

Parameters:
s - The name of the service

serverDescription

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


getUseX11

public boolean getUseX11()
Whether this service requires X for display


getX11display

public java.lang.String getX11display()
Get the X display name


setX11display

public void setX11display(java.lang.String newX11display)
Remember the X display name

Parameters:
newX11display - The name of the new X display

getUseVNC

public boolean getUseVNC()
Whether this service uses VNC for X display


getDebug

public boolean getDebug()
Whether to show debugging information


getSavedResults

public boolean getSavedResults()
Whether this service supports saved results


getHasBatchMode

public boolean getHasBatchMode()
Whether this service supports batch mode


getHasInteractiveMode

public boolean getHasInteractiveMode()
Whether this service supports interactive mode


getCurrentMode

public java.lang.String getCurrentMode()
The current mode. We understand interactive and batch. Constraints are applied to the return value.

Returns:
a String containing the current mode. If exactly one of hasInteractiveMode or hasBatchMode is true, will always return "interactive" or "batch" irrespective of the property setting. If neither or both are true, returns the property setting.

setCurrentMode

public void setCurrentMode(java.lang.String newMode)
Set the current mode. There are no constraints on the value here, although only interactive and batch are supported, so it's the responsibility of the application to do something sensible here.

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.


updateEmbreoProperty

public void updateEmbreoProperty(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

updateEmbreoPropString

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

Parameters:
entry - String containing a key=value message

updateEmbreoPropStrings

public void updateEmbreoPropStrings(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

updateEmbreoPropHash

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

Parameters:
hash - Hashtable containg properties

getHasAnnotation

public boolean getHasAnnotation()
Whether this service supports annotation


getHasLocalLaunch

public boolean getHasLocalLaunch()
Whether this service supports local (native) application launch


editFrame

public void editFrame()
Generates a frame that allows the user to modify selected parameters from the GUI