org.gcube.common.core.contexts
Class GHNClientContext
java.lang.Object
org.gcube.common.core.contexts.GCUBEContext
org.gcube.common.core.contexts.GHNContext
org.gcube.common.core.contexts.GHNClientContext
public class GHNClientContext
- extends GHNContext
Adapts GHNContext to the case in which the gHN is not actually running.
- Author:
- Fabio Simeoni (University of Strathclyde)
| Fields inherited from class org.gcube.common.core.contexts.GHNContext |
ALLOWEDSCOPES_JNDI_NAME, CONFIGDIR_NAME, CONTAINER_STATUS_JNDI_NAME, COORDINATES_JNDI_NAME, COUNTRY_JNDI_NAME, CUSTOMLABELS_JNDI_NAME, DEFAULT_TEST_INTERVAL, DEFAULT_TRUSTEDGHNINTERVAL, DEFAULT_UPDATE_INTERVAL, GCF_VERSION, GHN_CLIENT_JNDI_RESOURCE, GHN_JNDI_RESOURCE, GHN_TYPE, GHN_UPDATE_ATTEMPTS, implementations, IMPLEMENTATIONS_RESOURCE, INFRASTRUCTURE_NAME, JNDI_SERVICES_BASE_NAME, LOCATION_JNDI_NAME, MBEANS_PREFIX, MODE_JNDI_NAME, MSGBROKER, node, OPEN_PORTS, OVERRIDE_SERVICE_SECURITY, PROFILE_FILE_NAME, PUBLISHED_HOST_NAME, PUBLISHED_PORT_NAME, SECURITY_JNDI_NAME, SHUTDOWN_DELAY, singleton, STARTSCOPES_JNDI_NAME, STORAGE_ROOT, TESTINTERVAL_JNDI_NAME, TRUSTEDGHNINTERVAL_JNDI_NAME, UPDATEINTERVAL_JNDI_NAME |
| Methods inherited from class org.gcube.common.core.contexts.GHNContext |
addScope, delegateCredentials, getAllowedScopes, getBaseURL, getBaseURLToPublish, getContext, getCPUInfo, getDeployedPortTypes, getFile, getFreePort, getFreeSpace, getGHN, getGHNID, getHostDomain, getHostname, getHostnameAndPort, getImplementation, getIP, getLoadStatistics, getLocalInstanceContext, getLocation, getManagementBean, getMemoryUsage, getMode, getPort, getPublishedHostDomain, getPublishedHostname, getPublishedHostnameAndPort, getPublishedPort, getResource, getServiceContext, getServiceContexts, getServiceEndpointPrefix, getStartScopes, getStatus, getStatusMessage, getStorageRoot, getTrustedGHNSynchInterval, getType, getUptime, getVirtualPlatformsLocation, isClientMode, isGHNReady, isSecurityEnabled, overrideServiceSecurity, registerService, removeScope, restart, restartAndClean, setMode, setStatus, shutdown, subscribeForCredential, subscribeForCredentialRequest, subscribeGHNEvents, unsubscribeGHNEvents |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SERVER_WSDD_FILE
public static final String SERVER_WSDD_FILE
- Server WSDD File
- See Also:
- Constant Field Values
GHNClientContext
public GHNClientContext()
initialise
protected void initialise()
throws Exception
- Used internally to initialise the context at class loading time.
- Overrides:
initialise in class GHNContext
- Throws:
Exception - if the context could not be initialised.
configureGHN
protected void configureGHN(File file)
throws Exception
- Used internally to load external configuration.
- Overrides:
configureGHN in class GHNContext
- Parameters:
file - the configuration file.
- Throws:
Exception - if it could not load external configuration
configureGHNResource
protected void configureGHNResource()
throws Exception
- Used internally to configure the
GCUBEHostingNode resource that models the local gHN.
- Overrides:
configureGHNResource in class GHNContext
- Throws:
Exception - if the resource could not be configured
getProperty
public Object getProperty(String prop,
boolean... required)
throws RuntimeException
- Resolve a configuration property against the naming service. Resolution is relative
to the root JNDI context of the naming service and the JNDI name associated with the context.
- Overrides:
getProperty in class GCUBEContext
- Parameters:
prop - the property.required - (optional) true if the property is required, false or omitted if property is optional.
The only implication is a different handling of failure and logging. Failure in resolving optional properties results in a runtime
exception and fatal log entry, whereas failure in resolving optional properties results in a null result and warning
in the log.
- Returns:
- the value of the property, or
null if the property was optional and could not be resolved.
- Throws:
RuntimeException - if the property is required but cannot be resolved.
getServerWsddDocument
public org.apache.axis.deployment.wsdd.WSDDDocument getServerWsddDocument()
Copyright © 2012. All Rights Reserved.