|
org.netbeans.modules.j2eeserver/4 1.55.0 1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.modules.j2ee.deployment.plugins.api.InstanceProperties
public abstract class InstanceProperties
A way to ask the IDE to store customized information about a server instance and make it available to a plugin. Typical usage for create new instance would be like this: InstanceProperties props = InstanceProperties.getInstanceProperties(url); if (props == null) props = InstanceProperties.createInstanceProperties(url, user, password, displayName); props.setProperty(prop1, value1); . . .
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
InstanceProperties()
|
|
| Method Summary | |
|---|---|
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 |
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()
Return DeploymentManager associated with this instance. |
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
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
| Constructor Detail |
|---|
public InstanceProperties()
| Method Detail |
|---|
public static InstanceProperties getInstanceProperties(String url)
url - the url connection string to get the instance deployment manager.
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 exists
InstanceCreationException - 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 exists
InstanceCreationException - when instance with same url already
registeredremoveInstance(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 yet
public abstract void setProperty(String propname,
String value)
throws IllegalStateException
propname - name of propertyvalue - property string value
IllegalStateException - when instance already removed or not created yet
public abstract String getProperty(String propname)
throws IllegalStateException
propname - name of property
IllegalStateException - when instance already removed or not created yet
public abstract Enumeration propertyNames()
throws IllegalStateException
IllegalStateException - when instance already removed or not created yetpublic 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.
|
org.netbeans.modules.j2eeserver/4 1.55.0 1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||