|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.common.core.contexts.GCUBEContext
org.gcube.common.core.contexts.GCUBERemotePortTypeContext<PORTTYPE>
PORTTYPE - the type of the stub of the remote port-type.public class GCUBERemotePortTypeContext<PORTTYPE extends Remote>
Contexts for remote port-types accessed through a locally available distribution of their stubs.
If the distribution is gCube-compliant (e.g. was produced with gCore building facilities), the contexts expose the configuration of the remote port-type and its service, and in fact use it to achieve transparent setting of scoping and security for gCube calls to the port-type.
Normally, clients do not work directly with the contexts, but request a gCube proxy to the conventional port-type stub, which can offer the transparencies mentioned above. Contexts are instead created implicitly, in the process of creating stub proxies. They are then shared across all future requests for proxies of the same remote port-types.
| Field Summary | |
|---|---|
protected static String |
BUILD_PROPERTIES_FILE_NAME
Standard name of the build property file of the remote port-type. |
static String |
CALLER_HEADER_NAME
Name of the scope call header. |
static String |
CALLER_NS
Namespace of scope-related headers |
protected static Map<Class<? extends Remote>,GCUBERemotePortTypeContext<?>> |
contexts
Cache of remote port-type contexts. |
protected org.apache.axis.deployment.wsdd.WSDDService |
deploymentDescriptor
The deployment descriptor of the remote port-type. |
protected static String |
JNDI_FILE_NAME
Standard name of the JNDI configuration file of the remote port-type. |
protected static String |
JNDI_NAME_BUILD_PROPERTY
Standard name of the build property which identifies the JNDI configuration of the remote port-type. |
protected static String |
JNDI_STUBS_ROOT_CONTEXT
Root Context for remote port-type configurations. |
protected Class<? extends Remote> |
portTypeClass
The class of the stub of the remote port-type. |
protected String |
portTypeJNDIName
The JNDI name of the remote port-type. |
protected org.globus.wsrf.impl.security.descriptor.ServiceSecurityDescriptor |
securityDescriptor
The security descriptor of the remote port-type. |
protected GCUBEService |
service
The local resource which models the service of the remote port-type. |
protected String |
serviceJNDIName
The JNDI name of the service of the remote port-type. |
protected static String |
WSDD_FILE_NAME
Standard name of the WSDD configuration file of the remote port-type. |
| Fields inherited from class org.gcube.common.core.contexts.GCUBEContext |
|---|
logger, timers |
| Method Summary | ||
|---|---|---|
org.apache.axis.deployment.wsdd.WSDDService |
getDeploymentDescriptor()
Returns the deployment descriptor of the remote port-type. |
|
Object |
getProperty(String prop,
boolean... required)
Resolve a configuration property against the naming service. |
|
static
|
getProxy(PORTTYPE portTypeStub,
GCUBEScope scope,
GCUBESecurityManager... securityManager)
Returns a gCube proxy to a conventional stub of a remote port-type. |
|
static
|
getProxy(PORTTYPE portTypeStub,
GCUBEScope scope,
int callTimeout,
GCUBESecurityManager... securityManager)
Returns a gCube proxy to a conventional stub of a remote port-type. |
|
static
|
getProxy(PORTTYPE portTypeStub,
GCUBEScopeManager scopeManager,
GCUBESecurityManager... securityManager)
Returns a gCube proxy to a conventional stub of a remote port-type. |
|
static
|
getProxy(PORTTYPE portTypeStub,
GCUBEScopeManager scopeManager,
int callTimeout,
GCUBESecurityManager... securityManager)
Returns a gCube proxy to a conventional stub of a remote port-type. |
|
static
|
getProxy(PORTTYPE portTypeStub,
GCUBEServiceContext context)
Returns a gCube proxy to a conventional stub of a remote port-type. |
|
static
|
getProxy(PORTTYPE portTypeStub,
GCUBEServiceContext context,
int callTimeout)
Returns a gCube proxy to a conventional stub of a remote port-type. |
|
InputStream |
getResource(String resourceName)
Returns a classpath resource given its path. |
|
org.globus.wsrf.impl.security.descriptor.ServiceSecurityDescriptor |
getSecurityDescriptor()
Returns the security descriptor of the remote port-type. |
|
GCUBEService |
getService()
Returns the GCUBEService resource of the service
of the remote port-type. |
|
Object |
getServiceProperty(String prop)
Returns the value of an arbitrary JNDI property (resource or environment) of the service of the remote port-type. |
|
protected void |
parseJNDIConfig(InputStream config)
Loads a JNDI configuration file into the JNDI context reserved to remote port-types. |
|
| Methods inherited from class org.gcube.common.core.contexts.GCUBEContext |
|---|
debugContext, getFile, getJNDIContext, getName, getTiming, printContext, resetTimer, setJNDIContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static String JNDI_STUBS_ROOT_CONTEXT
protected static String JNDI_FILE_NAME
protected static String WSDD_FILE_NAME
protected static String BUILD_PROPERTIES_FILE_NAME
protected static String JNDI_NAME_BUILD_PROPERTY
public static final String CALLER_HEADER_NAME
public static final String CALLER_NS
protected static Map<Class<? extends Remote>,GCUBERemotePortTypeContext<?>> contexts
protected Class<? extends Remote> portTypeClass
protected GCUBEService service
protected String serviceJNDIName
protected String portTypeJNDIName
protected org.apache.axis.deployment.wsdd.WSDDService deploymentDescriptor
protected org.globus.wsrf.impl.security.descriptor.ServiceSecurityDescriptor securityDescriptor
| Method Detail |
|---|
public static <PORTTYPE extends Remote> PORTTYPE getProxy(PORTTYPE portTypeStub,
GCUBEServiceContext context)
throws Exception
GCUBEServiceContext.
PORTTYPE - the type of the port-type stub.portTypeStub - the original port-type stub.context - the service context.
Exception - if a proxy for the stub could not be returned.
public static <PORTTYPE extends Remote> PORTTYPE getProxy(PORTTYPE portTypeStub,
GCUBEServiceContext context,
int callTimeout)
throws Exception
GCUBEServiceContext.
PORTTYPE - the type of the port-type stub.portTypeStub - the original port-type stub.context - the service context.callTimeout - the timeout per each call
Exception - if a proxy for the stub could not be returned.
public static <PORTTYPE extends Remote> PORTTYPE getProxy(PORTTYPE portTypeStub,
GCUBEScope scope,
GCUBESecurityManager... securityManager)
throws Exception
GCUBEScope
and in the context of a given GCUBESecurityManager.
Note: the proxy so-created
PORTTYPE - the type of the port-type stub.portTypeStub - the original port-type stub.scope - the scope.securityManager - the security manager.
Exception - if a proxy for the stub could not be returned.
public static <PORTTYPE extends Remote> PORTTYPE getProxy(PORTTYPE portTypeStub,
GCUBEScope scope,
int callTimeout,
GCUBESecurityManager... securityManager)
throws Exception
GCUBEScope
and in the context of a given GCUBESecurityManager.
Note: the proxy so-created
PORTTYPE - the type of the port-type stub.portTypeStub - the original port-type stub.scope - the scope.callTimeout - the timeout per each callsecurityManager - the security manager.
Exception - if a proxy for the stub could not be returned.
public static <PORTTYPE extends Remote> PORTTYPE getProxy(PORTTYPE portTypeStub,
GCUBEScopeManager scopeManager,
GCUBESecurityManager... securityManager)
throws Exception
GCUBEScopeManager
and a given GCUBESecurityManager.
PORTTYPE - the type of the port-type stub.portTypeStub - the original port-type stub.scopeManager - the scope manager.securityManager - the security manager.
Exception - if a proxy for the stub could not be returned.
public static <PORTTYPE extends Remote> PORTTYPE getProxy(PORTTYPE portTypeStub,
GCUBEScopeManager scopeManager,
int callTimeout,
GCUBESecurityManager... securityManager)
throws Exception
GCUBEScopeManager
and a given GCUBESecurityManager.
PORTTYPE - the type of the port-type stub.portTypeStub - the original port-type stub.scopeManager - the scope manager.callTimeout - the timeout per each callsecurityManager - the security manager.
Exception - if a proxy for the stub could not be returned.public InputStream getResource(String resourceName)
getResource in class GCUBEContextnull if the path could not be resolved.public Object getServiceProperty(String prop)
prop - the property.
public Object getProperty(String prop,
boolean... required)
throws RuntimeException
getProperty in class GCUBEContextprop - 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.
null if the property was optional and could not be resolved.
RuntimeException - if the property is required but cannot be resolved.public GCUBEService getService()
GCUBEService resource of the service
of the remote port-type.
public org.apache.axis.deployment.wsdd.WSDDService getDeploymentDescriptor()
public org.globus.wsrf.impl.security.descriptor.ServiceSecurityDescriptor getSecurityDescriptor()
protected void parseJNDIConfig(InputStream config)
throws Exception
config - the file as a stream.
Exception - if the configuration could not be loaded.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||