|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.ecf.provider.generic.SSLGenericContainerInstantiator
public class SSLGenericContainerInstantiator
Nested Class Summary | |
---|---|
protected class |
SSLGenericContainerInstantiator.GenericContainerArgs
|
Field Summary | |
---|---|
protected static java.lang.String[] |
genericProviderIntents
|
static java.lang.String |
SSLCLIENT_NAME
|
static java.lang.String |
SSLSERVER_NAME
|
Constructor Summary | |
---|---|
SSLGenericContainerInstantiator()
|
Method Summary | |
---|---|
IContainer |
createInstance(ContainerTypeDescription description,
java.lang.Object[] args)
Create instance of IContainer. |
protected java.util.Set |
getAdaptersForClass(java.lang.Class clazz)
|
protected SSLGenericContainerInstantiator.GenericContainerArgs |
getClientArgs(java.lang.Object[] args)
|
protected ID |
getIDFromArg(java.lang.Object arg)
|
java.lang.String[] |
getImportedConfigs(ContainerTypeDescription description,
java.lang.String[] exporterSupportedConfigs)
Get the imported config types for a given ContainerTypeDescription for the given exporter supported config types. |
protected java.lang.Integer |
getIntegerFromArg(java.lang.Object arg)
|
protected java.lang.String[] |
getInterfacesAndAdaptersForClass(java.lang.Class clazz)
|
protected java.util.Set |
getInterfacesForClass(java.lang.Class clazz)
|
protected java.util.Set |
getInterfacesForClass(java.util.Set s,
java.lang.Class clazz)
|
java.util.Dictionary |
getPropertiesForImportedConfigs(ContainerTypeDescription description,
java.lang.String[] importedConfigs,
java.util.Dictionary exportedProperties)
Get the properties associated with the given description, with the given importedConfigTypes, via the given exportedProperties. |
protected SSLGenericContainerInstantiator.GenericContainerArgs |
getServerArgs(java.lang.Object[] args)
|
java.lang.String[] |
getSupportedAdapterTypes(ContainerTypeDescription description)
Get array of supported adapters for the given container type description. |
java.lang.String[] |
getSupportedConfigs(ContainerTypeDescription description)
Get supported configs for the given ContainerTypeDescription. |
java.lang.String[] |
getSupportedIntents(ContainerTypeDescription description)
Get supported intents for the given ContainerTypeDescription. |
java.lang.Class[][] |
getSupportedParameterTypes(ContainerTypeDescription description)
Get array of parameter types for given container type description. |
protected boolean |
isClient(ContainerTypeDescription description)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String[] genericProviderIntents
public static final java.lang.String SSLCLIENT_NAME
public static final java.lang.String SSLSERVER_NAME
Constructor Detail |
---|
public SSLGenericContainerInstantiator()
Method Detail |
---|
protected ID getIDFromArg(java.lang.Object arg) throws IDCreateException
IDCreateException
protected java.lang.Integer getIntegerFromArg(java.lang.Object arg)
protected SSLGenericContainerInstantiator.GenericContainerArgs getClientArgs(java.lang.Object[] args) throws IDCreateException
IDCreateException
protected boolean isClient(ContainerTypeDescription description)
protected SSLGenericContainerInstantiator.GenericContainerArgs getServerArgs(java.lang.Object[] args) throws IDCreateException
IDCreateException
public IContainer createInstance(ContainerTypeDescription description, java.lang.Object[] args) throws ContainerCreateException
IContainerInstantiator
ContainerFactory.getDefault().createContainer("foocontainer",new Object { "hello" });
createInstance
in interface IContainerInstantiator
description
- the ContainerTypeDescription associated with the registered
container provider implementationargs
- parameters specified by the caller. May be null if no
parameters are passed in by caller to
ContainerFactory.getDefault().createContainer(...)
ContainerCreateException
protected java.util.Set getAdaptersForClass(java.lang.Class clazz)
protected java.util.Set getInterfacesForClass(java.util.Set s, java.lang.Class clazz)
protected java.util.Set getInterfacesForClass(java.lang.Class clazz)
protected java.lang.String[] getInterfacesAndAdaptersForClass(java.lang.Class clazz)
public java.lang.String[] getSupportedAdapterTypes(ContainerTypeDescription description)
IContainerInstantiator
IContainer.getAdapter(Class)
with the same type name as a
returned value will return a non-null
result. In other
words, even if the class name is in the returned array, subsequent calls
to IContainer.getAdapter(Class)
may still return
null
.
getSupportedAdapterTypes
in interface IContainerInstantiator
description
- the ContainerTypeDescription to report adapters for. Must not
be null
.
null
may be returned by
the provider if no adapters are supported for this description.public java.lang.Class[][] getSupportedParameterTypes(ContainerTypeDescription description)
IContainerInstantiator
IContainerInstantiator.createInstance(ContainerTypeDescription, Object[])
.
Each of the rows of the returned array specifies a Class[] of parameter types. These parameter types correspond to the types of Object[] that can be passed into the second parameter of
IContainerInstantiator.createInstance(ContainerTypeDescription, Object[])
.
Consider the following example:
public Class[][] getSupportedParameterTypes() { return new Class[][] { { String.class }, { String.class, String.class } }; }The above means that there are two acceptable values for the Object [] passed into
IContainerInstantiator.createInstance(ContainerTypeDescription, Object[])
:
1) a single String, and 2) two Strings. These would therefore be
acceptable as input to createInstance:
IContainer container = ContainerFactory.getDefault().createContainer( description, new Object[] { "Hello" }); IContainer container2 = ContainerFactory.getDefault().createContainer( description, new Object[] { "Hello" });
getSupportedParameterTypes
in interface IContainerInstantiator
description
- the ContainerTypeDescription to return parameter types for
IContainerInstantiator.createInstance(ContainerTypeDescription, Object[])
.
null
returned if no parameter types supported for
given description.IContainerInstantiator.getSupportedParameterTypes(org.eclipse.ecf.core.ContainerTypeDescription)
public java.lang.String[] getSupportedIntents(ContainerTypeDescription description)
IRemoteServiceContainerInstantiator
getSupportedIntents
in interface IContainerInstantiator
getSupportedIntents
in interface IRemoteServiceContainerInstantiator
description
- the ContainerTypeDescription to return the supported intents for.
Will not be null
.
null
may be returned if the
given description does not support any intents.public java.lang.String[] getSupportedConfigs(ContainerTypeDescription description)
IRemoteServiceContainerInstantiator
getSupportedConfigs
in interface IRemoteServiceContainerInstantiator
description
- the ContainerTypeDescription to return the supported configs for.
Will not be null
.
null
may be returned if the
given description does not support any config types.public java.lang.String[] getImportedConfigs(ContainerTypeDescription description, java.lang.String[] exporterSupportedConfigs)
IRemoteServiceContainerInstantiator
Get the imported config types for a given ContainerTypeDescription for the given exporter supported config types. This method will be called to determine what the local container imported configs are for the given description and exporterSupportedConfigTypes. The local provider can decide which (if any) imported config types should be returned and return them.
As an example, consider the config types for the ECF generic provider. A generic server has a config type
of 'ecf.generic.server', and the client has 'ecf.generic.server'. If the generic server exports a given
service, the exportersSupportedConfigTypes will be '[ecf.generic.server]'. When this method is called
with the ecf.generic.client description (i.e. the container type description named 'ecf.generic.client'), it
should respond with a non-null, non-empty array...e.g.: [ecf.generic.client]. This indicates that the
ecf.generic.client can serve as an importer for the given exporter config type. All, other descriptions
should return null
, to indicate that they cannot import a remote service exported by the given
exporterSupportedConfigTypes.
getImportedConfigs
in interface IRemoteServiceContainerInstantiator
description
- the container type description under consideration.exporterSupportedConfigs
- the exporter supported config types under consideration.
null
, unless
one or more of the exporterSupportedConfigTypes is recognized for the given description.public java.util.Dictionary getPropertiesForImportedConfigs(ContainerTypeDescription description, java.lang.String[] importedConfigs, java.util.Dictionary exportedProperties)
IRemoteServiceContainerInstantiator
getPropertiesForImportedConfigs
in interface IRemoteServiceContainerInstantiator
description
- the container type description under consideration.importedConfigs
- the imported config types for the given properties. Will not be null
, and
should be the same values as returned from IRemoteServiceContainerInstantiator.getImportedConfigs(ContainerTypeDescription, String[])
.exportedProperties
- the properties from the exported service. Will not be null
.
null
if
no properties are associated with the given description, importedConfigTypes, exportedProperties.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |