|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.bootstrap.impl.base.config.AbstractBasicServerConfig<T>
public abstract class AbstractBasicServerConfig<T extends org.jboss.bootstrap.spi.config.ServerConfig<T>>
BasicServerConfig Base for simple Object-backed implementations of a Server Configuration. As this is exported from the Server, this is Thread-safe.
Field Summary |
---|
Fields inherited from interface org.jboss.bootstrap.spi.config.ServerConfig |
---|
PROP_KEY_BOOTSTRAP_HOME_URL, PROP_KEY_BOOTSTRAP_NAME, PROP_KEY_BOOTSTRAP_URL |
Constructor Summary | |
---|---|
AbstractBasicServerConfig(Class<T> actualClass)
Constructor |
|
AbstractBasicServerConfig(Class<T> actualClass,
Map<String,String> overrideProperties)
Constructor |
Method Summary | |
---|---|
protected URL |
adjustToDirectory(URL url)
If the specified URL denotes a directory (ie. |
T |
bootstrapHome(String bootstrapHome)
|
T |
bootstrapHome(URL bootstrapHome)
|
T |
bootstrapName(String name)
|
T |
bootstrapUrl(String bootstrapUrl)
|
T |
bootstrapUrl(URL bootstrapLocation)
|
protected void |
checkMutable()
Throws IllegalStateException if this configuration is frozen |
protected URL |
copyURL(URL url)
Copies and returns the specified URL. |
protected T |
covarientReturn()
Casts this configuration to the requisite type, using the actual implementation class. |
void |
freeze()
|
protected Class<T> |
getActualClass()
Returns the actual types of this configuration, used in covarient return of the mutator methods |
URL |
getBootstrapHome()
|
String |
getBootstrapName()
|
URL |
getBootstrapUrl()
|
Map<String,String> |
getProperties()
|
String |
getProperty(String key)
|
boolean |
isFrozen()
|
T |
properties(Map<String,String> properties)
|
T |
properties(Properties properties)
|
T |
property(String key,
String value)
|
protected void |
setPropertyForString(String propertyName,
Boolean value)
Sets both the configuration property and System property with the specified key and specified value |
protected void |
setPropertyForString(String propertyName,
Integer value)
Sets both the configuration property and System property with the specified key and specified value |
protected void |
setPropertyForString(String propertyName,
String value)
Sets both the configuration property and System property with the specified key and specified value |
protected void |
setPropertyForUrl(String propertyName,
URL url)
Sets both the configuration property and System property with the specified key and the external form of the specified URL |
protected URL |
urlFromString(String url)
Constructs a URL from the specified String, throwing IllegalArgumentException to wrap the
MalformedURLException if unable to do so. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractBasicServerConfig(Class<T> actualClass)
actualClass
- The actual class of this Server Configuration
to be used in casting for covarient return typespublic AbstractBasicServerConfig(Class<T> actualClass, Map<String,String> overrideProperties)
actualClass
- The actual class of this Server Configuration
to be used in casting for covarient return typesoverrideProperties
- A Map of properties to override those found
in System PropertiesMethod Detail |
---|
public URL getBootstrapHome()
getBootstrapHome
in interface org.jboss.bootstrap.spi.config.ServerConfig<T extends org.jboss.bootstrap.spi.config.ServerConfig<T>>
public String getBootstrapName()
getBootstrapName
in interface org.jboss.bootstrap.spi.config.ServerConfig<T extends org.jboss.bootstrap.spi.config.ServerConfig<T>>
public URL getBootstrapUrl()
getBootstrapUrl
in interface org.jboss.bootstrap.spi.config.ServerConfig<T extends org.jboss.bootstrap.spi.config.ServerConfig<T>>
public Map<String,String> getProperties()
getProperties
in interface org.jboss.bootstrap.spi.config.ServerConfig<T extends org.jboss.bootstrap.spi.config.ServerConfig<T>>
public String getProperty(String key) throws IllegalArgumentException
getProperty
in interface org.jboss.bootstrap.spi.config.ServerConfig<T extends org.jboss.bootstrap.spi.config.ServerConfig<T>>
IllegalArgumentException
public T bootstrapHome(URL bootstrapHome) throws IllegalArgumentException
bootstrapHome
in interface org.jboss.bootstrap.spi.config.ServerConfig<T extends org.jboss.bootstrap.spi.config.ServerConfig<T>>
IllegalArgumentException
public T bootstrapName(String name) throws IllegalArgumentException
bootstrapName
in interface org.jboss.bootstrap.spi.config.ServerConfig<T extends org.jboss.bootstrap.spi.config.ServerConfig<T>>
IllegalArgumentException
public T bootstrapUrl(URL bootstrapLocation) throws IllegalArgumentException
bootstrapUrl
in interface org.jboss.bootstrap.spi.config.ServerConfig<T extends org.jboss.bootstrap.spi.config.ServerConfig<T>>
IllegalArgumentException
public T property(String key, String value) throws IllegalArgumentException
property
in interface org.jboss.bootstrap.spi.config.ServerConfig<T extends org.jboss.bootstrap.spi.config.ServerConfig<T>>
IllegalArgumentException
public T properties(Map<String,String> properties) throws IllegalArgumentException, IllegalStateException
properties
in interface org.jboss.bootstrap.spi.config.ServerConfig<T extends org.jboss.bootstrap.spi.config.ServerConfig<T>>
IllegalArgumentException
IllegalStateException
public T properties(Properties properties) throws IllegalArgumentException, IllegalStateException
properties
in interface org.jboss.bootstrap.spi.config.ServerConfig<T extends org.jboss.bootstrap.spi.config.ServerConfig<T>>
IllegalArgumentException
IllegalStateException
public void freeze() throws IllegalStateException
freeze
in interface org.jboss.bootstrap.spi.config.ServerConfig<T extends org.jboss.bootstrap.spi.config.ServerConfig<T>>
IllegalStateException
public boolean isFrozen()
isFrozen
in interface org.jboss.bootstrap.spi.config.ServerConfig<T extends org.jboss.bootstrap.spi.config.ServerConfig<T>>
public T bootstrapHome(String bootstrapHome) throws IllegalArgumentException, IllegalStateException
bootstrapHome
in interface org.jboss.bootstrap.spi.config.ServerConfig<T extends org.jboss.bootstrap.spi.config.ServerConfig<T>>
IllegalArgumentException
IllegalStateException
public T bootstrapUrl(String bootstrapUrl) throws IllegalArgumentException, IllegalStateException
bootstrapUrl
in interface org.jboss.bootstrap.spi.config.ServerConfig<T extends org.jboss.bootstrap.spi.config.ServerConfig<T>>
IllegalArgumentException
IllegalStateException
protected void setPropertyForUrl(String propertyName, URL url)
protected void setPropertyForString(String propertyName, String value)
protected void setPropertyForString(String propertyName, Integer value)
protected void setPropertyForString(String propertyName, Boolean value)
protected void checkMutable() throws IllegalStateException
IllegalStateException
protected URL adjustToDirectory(URL url)
url
-
protected Class<T> getActualClass()
protected final T covarientReturn() throws ClassCastException
ClassCastException
protected final URL copyURL(URL url)
url
-
protected final URL urlFromString(String url) throws IllegalArgumentException
IllegalArgumentException
to wrap the
MalformedURLException
if unable to do so. Null arguments
will be ignored.
url
-
IllegalArgumentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |