PORTTYPE - the type of the stub of the remote port-type.public class GCUBERemotePortTypeContext<PORTTYPE extends Remote> extends GCUBEContext
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.
| Modifier and Type | Field and Description |
|---|---|
static String |
AUTH_TOKEN_HEADER_NAME
Name of the scope call header.
|
protected static String |
BUILD_PROPERTIES_FILE_NAME
Standard name of the build property file of the remote port-type.
|
static String |
CALLED_METHOD_HEADER_NAME |
static String |
CALLER_HEADER_NAME
Name of the scope call header.
|
static String |
CALLER_NS
Namespace of scope-related headers
|
static String |
CLASS_HEADER_NAME
Name of the service class call header.
|
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.
|
static String |
NAME_HEADER_NAME
Name of the service name call header.
|
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.
|
static String |
SCOPE_HEADER_NAME
Name of the scope call header.
|
static String |
SCOPE_NS
Namespace of scope-related headers
|
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.
|
logger, timers| Modifier and Type | Method and Description |
|---|---|
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 <PORTTYPE extends Remote> |
getProxy(PORTTYPE portTypeStub)
Returns a gCube proxy to a conventional stub of a remote port-type.
|
static <PORTTYPE extends Remote> |
getProxy(PORTTYPE portTypeStub,
GCUBEScope scope,
GCUBESecurityManager... securityManager)
Deprecated.
as to 1.6.0 sets the current scope and redirects to
getProxy(Remote) ignoring the GCUBESecurityManager parameter |
static <PORTTYPE extends Remote> |
getProxy(PORTTYPE portTypeStub,
GCUBEScope scope,
int callTimeout,
GCUBESecurityManager... securityManager)
Deprecated.
as to 1.6.0 sets the current scope and redirects to
#getProxy(Remote, int), ignoring the GCUBESecurityManager parameter |
static <PORTTYPE extends Remote> |
getProxy(PORTTYPE portTypeStub,
GCUBEScopeManager scopeManager,
GCUBESecurityManager... securityManager)
Deprecated.
as to 1.6.0 redirects to
getProxy(Remote) ignoring GCUBEScopeManager and GCUBESecurityManager parameters |
static <PORTTYPE extends Remote> |
getProxy(PORTTYPE portTypeStub,
GCUBEScopeManager scopeManager,
int callTimeout,
GCUBESecurityManager... securityManager)
Deprecated.
as to 1.6.0 redirects to
#getProxy(Remote, int) ignoring GCUBEScopeManager and GCUBESecurityManager parameters |
static <PORTTYPE extends Remote> |
getProxy(PORTTYPE portTypeStub,
GCUBEServiceContext context)
Returns a gCube proxy to a conventional stub of a remote port-type.
|
static <PORTTYPE extends Remote> |
getProxy(PORTTYPE portTypeStub,
GCUBEServiceContext context,
int callTimeout)
Returns a gCube proxy to a conventional stub of a remote port-type.
|
static <PORTTYPE extends Remote> |
getProxy(PORTTYPE portTypeStub,
int callTimeout,
GCUBEServiceContext... context)
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.
|
debugContext, getFile, getJNDIContext, getName, getTiming, printContext, resetTimer, setJNDIContextpublic static final String CLASS_HEADER_NAME
public static final String NAME_HEADER_NAME
public static final String SCOPE_HEADER_NAME
public static final String AUTH_TOKEN_HEADER_NAME
public static final String CALLED_METHOD_HEADER_NAME
public static final String SCOPE_NS
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
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 callException - if a proxy for the stub could not be returned.@Deprecated public static <PORTTYPE extends Remote> PORTTYPE getProxy(PORTTYPE portTypeStub, GCUBEScope scope, GCUBESecurityManager... securityManager) throws Exception
getProxy(Remote) ignoring the GCUBESecurityManager parameterGCUBEScope
and in the context of a given GCUBESecurityManager.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.@Deprecated public static <PORTTYPE extends Remote> PORTTYPE getProxy(PORTTYPE portTypeStub, GCUBEScope scope, int callTimeout, GCUBESecurityManager... securityManager) throws Exception
#getProxy(Remote, int), ignoring the GCUBESecurityManager parameterGCUBEScope
and in the context of a given GCUBESecurityManager.
Note: the proxy so-createdPORTTYPE - 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.@Deprecated public static <PORTTYPE extends Remote> PORTTYPE getProxy(PORTTYPE portTypeStub, GCUBEScopeManager scopeManager, GCUBESecurityManager... securityManager) throws Exception
getProxy(Remote) ignoring GCUBEScopeManager and GCUBESecurityManager parametersGCUBEScopeManager
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.@Deprecated public static <PORTTYPE extends Remote> PORTTYPE getProxy(PORTTYPE portTypeStub, GCUBEScopeManager scopeManager, int callTimeout, GCUBESecurityManager... securityManager) throws Exception
#getProxy(Remote, int) ignoring GCUBEScopeManager and GCUBESecurityManager parametersGCUBEScopeManager
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 static <PORTTYPE extends Remote> PORTTYPE getProxy(PORTTYPE portTypeStub) throws Exception
PORTTYPE - the type of the port-type stub.portTypeStub - the original port-type stub.callTimeout - the timeout per each callException - if a proxy for the stub could not be returned.public static <PORTTYPE extends Remote> PORTTYPE getProxy(PORTTYPE portTypeStub, int callTimeout, GCUBEServiceContext... context) throws Exception
PORTTYPE - the type of the port-type stub.portTypeStub - the original port-type stub.callTimeout - the timeout per each callException - 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.Copyright © 2015. All Rights Reserved.