public abstract class InstanceProperties extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEPLOYMENT_TIMEOUT
Deployment timeout property, The number of seconds to allow before
assuming that a request to deploy a project to an instance has failed
|
static String |
DISPLAY_NAME_ATTR
Display name property, its value is used by IDE to represent server instance.
|
static String |
HTTP_PORT_NUMBER
HTTP port property, The port where the instance runs
|
static String |
PASSWORD_ATTR
Password property, its value is used by the deployment manager.
|
static String |
REGISTERED_WITHOUT_UI
Name of the property indicating whether the UI should be
handled by j2eeserver api.
|
static String |
REMOVE_FORBIDDEN
Remove forbidden property, if its value is set to
true , it
won't be allowed to remove the server instance from the server registry. |
static String |
SHUTDOWN_TIMEOUT
Shutdown timeout property, The number of seconds to allow before assuming
that a request to stop an instance has failed
|
static String |
STARTUP_TIMEOUT
Startup timeout property, The number of seconds to allow before assuming
that a request to start an instance has failed
|
static String |
URL_ATTR
URL property, its value is used as a connection string to get the deployment
manager (e.g.
|
static String |
USERNAME_ATTR
Username property, its value is used by the deployment manager.
|
Constructor and Description |
---|
InstanceProperties() |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Add
PropertyChangeListener which will be notified of
InstanceProperties changes. |
static InstanceProperties |
createInstanceProperties(String url,
String username,
String password)
Deprecated.
use the factory method with displayName parameter.
|
static InstanceProperties |
createInstanceProperties(String url,
String username,
String password,
String displayName)
Create new instance and returns instance properties for the server instance.
|
static InstanceProperties |
createInstanceProperties(String url,
String username,
String password,
String displayName,
Map<String,String> initialProperties)
Create new instance and returns instance properties for the server instance.
|
static InstanceProperties |
createInstancePropertiesNonPersistent(String url,
String username,
String password,
String displayName,
Map<String,String> initialProperties)
Create new instance without persisting it and returns instance properties for the server instance.
|
static InstanceProperties |
createInstancePropertiesWithoutUI(String url,
String username,
String password,
String displayName,
Map<String,String> initialProperties)
Create new instance and returns instance properties for the server instance.
|
protected void |
firePropertyChange(PropertyChangeEvent evt)
This method should be called to notify interested listeners when
InstanceProperties change.
|
abstract javax.enterprise.deploy.spi.DeploymentManager |
getDeploymentManager()
Deprecated.
without replacement - this method should not be used as there
is no api use case for it
|
static String[] |
getInstanceList()
Returns list of URL strings of all registered instances
|
static InstanceProperties |
getInstanceProperties(String url)
Returns instance properties for the server instance.
|
abstract String |
getProperty(String propname)
Get instance property
|
abstract Enumeration |
propertyNames()
Get instance property keys
|
abstract void |
refreshServerInstance()
Ask the server instance to reset cached deployment manager, J2EE
management objects and refresh it UI elements.
|
static void |
removeInstance(String url)
Removes the given server instance from the JavaEE server registry,
making it unavailable to JavaEE projects.
|
abstract void |
setProperties(Properties props)
Set instance properties.
|
abstract void |
setProperty(String propname,
String value)
Set instance property
|
public static final String URL_ATTR
public static final String USERNAME_ATTR
public static final String PASSWORD_ATTR
public static final String DISPLAY_NAME_ATTR
public static final String REMOVE_FORBIDDEN
true
, it
won't be allowed to remove the server instance from the server registry.public static final String HTTP_PORT_NUMBER
public static final String STARTUP_TIMEOUT
public static final String SHUTDOWN_TIMEOUT
public static final String REGISTERED_WITHOUT_UI
public static final String DEPLOYMENT_TIMEOUT
public static InstanceProperties getInstanceProperties(String url)
url
- the url connection string to get the instance deployment manager.@Deprecated public static InstanceProperties createInstanceProperties(String url, String username, String password) throws InstanceCreationException
url
- the url connection string to get the instance deployment managerusername
- username which is used by the deployment manager.password
- password which is used by the deployment manager.InstanceProperties
object, null
if
instance does not existsInstanceCreationException
- when instance with same url already
registered.public static InstanceProperties createInstanceProperties(String url, String username, String password, String displayName) throws InstanceCreationException
url
- the url connection string to get the instance deployment manager.username
- username which is used by the deployment manager.password
- password which is used by the deployment manager.displayName
- display name which is used by IDE to represent this
server instance.InstanceProperties
object, null
if
instance does not exists.InstanceCreationException
- when instance with same url already
registered.public static InstanceProperties createInstanceProperties(String url, String username, String password, String displayName, Map<String,String> initialProperties) throws InstanceCreationException
url
- the url connection string to get the instance deployment manager.username
- username which is used by the deployment manager.password
- password which is used by the deployment manager.displayName
- display name which is used by IDE to represent this
server instance.initialProperties
- any other properties to set during the instance creation.
If the map contains any of InstanceProperties.URL_ATTR,
InstanceProperties.USERNAME_ATTR, InstanceProperties.PASSWORD_ATTR
or InstanceProperties.DISPLAY_NAME_ATTR they will be ignored
- the explicit parameter values are always used.
null
is accepted.InstanceProperties
object, null
if
instance does not exists.InstanceCreationException
- when instance with same url already
registered.public static InstanceProperties createInstancePropertiesWithoutUI(String url, String username, String password, String displayName, Map<String,String> initialProperties) throws InstanceCreationException
url
- the url connection string to get the instance deployment managerusername
- username which is used by the deployment managerpassword
- password which is used by the deployment managerdisplayName
- display name which is used by IDE to represent this
server instanceinitialProperties
- any other properties to set during the instance creation.
If the map contains any of InstanceProperties.URL_ATTR,
InstanceProperties.USERNAME_ATTR, InstanceProperties.PASSWORD_ATTR
or InstanceProperties.DISPLAY_NAME_ATTR they will be ignored
- the explicit parameter values are always used.
null
is accepted.InstanceProperties
object, null
if
instance does not existsInstanceCreationException
- when instance with same url already
registeredInstanceProperties.removeInstance(String)
public static InstanceProperties createInstancePropertiesNonPersistent(String url, String username, String password, String displayName, Map<String,String> initialProperties) throws InstanceCreationException
url
- the url connection string to get the instance deployment managerusername
- username which is used by the deployment managerpassword
- password which is used by the deployment managerdisplayName
- display name which is used by IDE to represent this
server instanceinitialProperties
- any other properties to set during the instance creation.
If the map contains any of InstanceProperties.URL_ATTR,
InstanceProperties.USERNAME_ATTR, InstanceProperties.PASSWORD_ATTR
or InstanceProperties.DISPLAY_NAME_ATTR they will be ignored
- the explicit parameter values are always used.
null
is accepted.InstanceProperties
object, null
if
instance does not existsInstanceCreationException
- when instance with same url already
registeredInstanceProperties.removeInstance(String)
public static void removeInstance(String url)
createInstancePropertiesWithoutUI
to remove those instances later.url
- the url connection string to get the instance deployment managerpublic static String[] getInstanceList()
public abstract void setProperties(Properties props) throws IllegalStateException
props
- properties to set for this server instance.IllegalStateException
- when instance already removed or not created yetpublic abstract void setProperty(String propname, String value) throws IllegalStateException
propname
- name of propertyvalue
- property string valueIllegalStateException
- when instance already removed or not created yetpublic abstract String getProperty(String propname) throws IllegalStateException
propname
- name of propertyIllegalStateException
- when instance already removed or not created yetpublic abstract Enumeration propertyNames() throws IllegalStateException
IllegalStateException
- when instance already removed or not created yet@Deprecated public abstract javax.enterprise.deploy.spi.DeploymentManager getDeploymentManager()
public abstract void refreshServerInstance()
public void addPropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener
which will be notified of
InstanceProperties
changes.listener
- PropertyChangeListener
which will be notified of
InstanceProperties
changes.protected void firePropertyChange(PropertyChangeEvent evt)
evt
- A PropertyChangeEvent object describing the event source
and the property that has changed.