public abstract class ConnectionDescriptor
extends java.lang.Object
ConnectionDescriptor.getAppServerType
may be used to do an initial
determination of the type of connection, after which a more platform-specific
adapter that sub-classes this may be created using
ConnectionDescriptor.newInstance()
to read/write further properties.
Connection properties should only be written through the correct adapter
to ensure data integrity. Use isMatchingType()
to ensure this.
This class defines some property names to promote uniformity, but imposes no conditions on how and when they should be used. The appropriate derived Descriptor would be the best source for reference.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALWAYS_PROMPT
Property name: should be prompted for security information.
|
static java.lang.String |
APPSERVER_TYPE
Property name: connection type.
|
protected AppServerProvider |
asProvider_ |
static java.lang.String |
CONNECTION_NAME
Property name: names the connection.
|
static java.lang.String |
DEFAULT_SESSION
Not used.
|
static java.lang.String |
DEPLOY_PASSWORD
Property name: deploy the password to the runtime environment.
|
static java.lang.String |
DEPLOYMENT_URL
Deployment URL.
|
static java.lang.String |
EXPERT_MODE
Property name: Expert Mode (user entered connect string)
|
static java.lang.String |
HOSTNAME
Property name: Hostname
|
static java.lang.String |
HTTP_HOSTNAME
Property: Public (external) Http host name
|
static java.lang.String |
HTTP_PORT
Property: Http port
|
static java.lang.String |
HTTPS_PORT
Property: Https Port
|
static java.lang.String |
IIOP_LOGIN_METH
Not used.
|
static java.lang.String |
JMX_CONNECTOR_HOST
Property: JMX Connection Host
|
static java.lang.String |
JMX_CONNECTOR_PATH
Property: JMX Connection Path
|
static java.lang.String |
JMX_CONNECTOR_PORT
Property: JMX Connection Port
|
static java.lang.String |
JMX_CONNECTOR_SSL_PORT
Property: JMX Connection SSL Port
|
static java.lang.String |
LOCALHOST |
static java.lang.String |
LOOPBACK |
static java.lang.String |
PASSWORD
Property name: connection password.
|
static java.lang.String |
RMI_PORT
Property: RMI Port
|
static java.lang.String |
ROLE
Property name: connection role (if applicable).
|
static java.lang.String |
SOAP_PORT
Property: Soap Port
|
static java.lang.String |
URL
Property name: connection URL.
|
static java.lang.String |
USE_SSL
Property: Use SSL connections
|
static java.lang.String |
USERNAME
Property name: connection username.
|
Constructor and Description |
---|
ConnectionDescriptor(AppServerProvider asProvider) |
Modifier and Type | Method and Description |
---|---|
protected static java.lang.String |
get(AppServerProvider provider,
java.lang.String property) |
java.lang.String |
get(java.lang.String property) |
AppServerProvider |
getAppServerProvider() |
java.lang.String |
getAppServerType()
Retrieve the stored AppServer type property from AppServerProvider.
|
static java.lang.String |
getAppServerType(AppServerProvider provider) |
protected abstract java.lang.String[] |
getDefaultProperties()
Return an linear array of key-value pairs that denote a template for
creating a new descriptor of a specific type.
|
java.lang.String |
getDeploymentURL()
Returns the Deployment URL if applicable.
|
boolean |
getDeployPassword() |
static boolean |
getDeployPassword(AppServerProvider provider) |
abstract java.lang.String |
getDescriptorType()
This should be implemented by sub-classes to specify the unique string
that identifies each AppServer type.
|
java.lang.String |
getPassword() |
static java.lang.String |
getPassword(AppServerProvider provider) |
java.lang.String |
getURL()
Get the connection URL spec if applicable.
|
java.lang.String |
getUserName() |
static java.lang.String |
getUserName(AppServerProvider provider) |
static boolean |
isMatchingType(AppServerProvider provider,
java.lang.Class<? extends ConnectionDescriptor> cdClass) |
boolean |
isMatchingType(java.lang.Class<? extends ConnectionDescriptor> descClass) |
static <T extends ConnectionDescriptor> |
newInstance(java.lang.Class<T> cdClass,
AppServerProvider provider) |
protected static java.lang.String |
set(AppServerProvider provider,
java.lang.String property,
java.lang.String value) |
void |
set(java.lang.String property,
java.lang.String value) |
static void |
setAppServerType(AppServerProvider provider,
java.lang.String type) |
void |
setAppServerType(java.lang.String type) |
static void |
setDeployPassword(AppServerProvider provider,
boolean deployPasswd) |
void |
setDeployPassword(boolean b) |
void |
setFactoryDefaults() |
static void |
setPassword(AppServerProvider provider,
java.lang.String s) |
void |
setPassword(java.lang.String s) |
static void |
setUserName(AppServerProvider provider,
java.lang.String name) |
void |
setUserName(java.lang.String name) |
public static final java.lang.String ALWAYS_PROMPT
public static final java.lang.String CONNECTION_NAME
public static final java.lang.String DEPLOY_PASSWORD
public static final java.lang.String URL
public static final java.lang.String DEPLOYMENT_URL
public static final java.lang.String EXPERT_MODE
public static final java.lang.String HOSTNAME
public static final java.lang.String JMX_CONNECTOR_HOST
public static final java.lang.String JMX_CONNECTOR_PORT
public static final java.lang.String JMX_CONNECTOR_SSL_PORT
public static final java.lang.String JMX_CONNECTOR_PATH
public static final java.lang.String HTTP_HOSTNAME
public static final java.lang.String HTTP_PORT
public static final java.lang.String HTTPS_PORT
public static final java.lang.String SOAP_PORT
public static final java.lang.String RMI_PORT
public static final java.lang.String USE_SSL
public static final java.lang.String PASSWORD
public static final java.lang.String ROLE
public static final java.lang.String USERNAME
public static final java.lang.String APPSERVER_TYPE
public static final java.lang.String IIOP_LOGIN_METH
public static final java.lang.String DEFAULT_SESSION
public static final java.lang.String LOCALHOST
public static final java.lang.String LOOPBACK
protected AppServerProvider asProvider_
public ConnectionDescriptor(AppServerProvider asProvider)
public AppServerProvider getAppServerProvider()
public java.lang.String getAppServerType()
public void setAppServerType(java.lang.String type)
public boolean isMatchingType(java.lang.Class<? extends ConnectionDescriptor> descClass)
public void setFactoryDefaults()
protected abstract java.lang.String[] getDefaultProperties()
public abstract java.lang.String getDescriptorType()
public java.lang.String getURL()
Presentation
s
each with its own URL, or it may return the default URL.public java.lang.String getDeploymentURL()
public java.lang.String getUserName()
public void setUserName(java.lang.String name)
public java.lang.String getPassword()
public void setPassword(java.lang.String s)
public boolean getDeployPassword()
public void setDeployPassword(boolean b)
public java.lang.String get(java.lang.String property)
public void set(java.lang.String property, java.lang.String value)
protected static java.lang.String get(AppServerProvider provider, java.lang.String property)
protected static java.lang.String set(AppServerProvider provider, java.lang.String property, java.lang.String value)
public static boolean isMatchingType(AppServerProvider provider, java.lang.Class<? extends ConnectionDescriptor> cdClass)
public static java.lang.String getAppServerType(AppServerProvider provider)
public static void setAppServerType(AppServerProvider provider, java.lang.String type)
public static java.lang.String getUserName(AppServerProvider provider)
public static void setUserName(AppServerProvider provider, java.lang.String name)
public static java.lang.String getPassword(AppServerProvider provider)
public static void setPassword(AppServerProvider provider, java.lang.String s)
public static boolean getDeployPassword(AppServerProvider provider)
public static void setDeployPassword(AppServerProvider provider, boolean deployPasswd)
public static <T extends ConnectionDescriptor> T newInstance(java.lang.Class<T> cdClass, AppServerProvider provider)