public class ActivationGroupImpl extends AbstractActivationGroup
Configuration
, as detailed
further below, and provide the necessary support to allow exporter-based
remote objects to go inactive. Instances of this class support the
creation of remote objects through the normal activatable constructor;
an activatable remote object must either implement the ProxyAccessor
interface to return a suitable proxy for the remote
object, or the remote object must itself be serializable and marshalling
the object must produce a suitable proxy for the remote object.
An instance of this class can be configured by specifying an
ActivationGroupData
instance containing configuration options
as the initialization data for the activation group. Typically
this is accomplished indirectly, by setting the
groupConfig
configuration entry for
phoenix itself. The following entries are obtained from the configuration,
all for the component named org.apache.river.phoenix
:
• |
loginContext
| |
---|---|---|
  | Type: |
|
  | Default: | null
|
  | Description: | JAAS login context |
• |
inheritGroupSubject
| |
---|---|---|
  | Type: | boolean
|
  | Default: | false
|
  | Description: | if true , group subject is inherited
when an activatable object is created
|
• |
instantiatorExporter
| |
---|---|---|
  | Type: |
|
  | Default: | retains existing JRMP export of instantiator |
  | Description: | ActivationInstantiator
exporter
|
• |
monitorPreparer
| |
---|---|---|
  | Type: |
|
  | Default: | new
|
  | Description: | ActivationMonitor
proxy preparer
|
• |
systemPreparer
| |
---|---|---|
  | Type: |
|
  | Default: | new
|
  | Description: | ActivationSystem
proxy preparer
|
• |
unexportTimeout
| |
---|---|---|
  | Type: | int
|
  | Default: | 60000
|
  | Description: | maximum time in milliseconds to wait for in-progress calls to finish before forcibly unexporting the group when going inactive |
• |
unexportWait
| |
---|---|---|
  | Type: | int
|
  | Default: | 10
|
  | Description: | milliseconds to wait between unexport attempts when going inactive |
This class depends on its createGroup
method being
called to initialize the activation group. As such, this class cannot be
used in conjunction with the standard rmid
.
ref
Constructor and Description |
---|
ActivationGroupImpl(ActivationGroupID id,
MarshalledObject data)
Creates an instance with the specified group identifier and
initialization data.
|
Modifier and Type | Method and Description |
---|---|
static ActivationGroup |
createGroup(ActivationGroupID id,
ActivationGroupDesc desc,
long incarnation)
Creates an
ActivationGroup instance and
returns it. |
activeObject, export, getProxyVerifier, inactiveObject, inactiveObject, newInstance, writeReplace
inactive
activeObject, currentGroupID, getSystem, inactiveGroup, setSystem
clone, exportObject, exportObject, exportObject, unexportObject
getClientHost, getLog, setLog
public ActivationGroupImpl(ActivationGroupID id, MarshalledObject data) throws ActivationException, RemoteException
createGroup
. By default, this instance
automatically exports itself as a UnicastRemoteObject
. (This
is a limitation of the existing activation system design.) If an
Exporter
was obtained by createGroup
,
then this instance is unexported from the JRMP runtime and re-exported
using that exporter. (Any incoming remote calls received on the
original JRMP export before this instance can be unexported will be
refused with a security exception thrown.) The
activeGroup
method of the
activation system proxy (in the group identifier) is called to
make the group active. The returned ActivationMonitor
proxy
is passed to the corresponding ProxyPreparer
obtained by
createGroup
. Note that after this constructor returns,
ActivationGroup.createGroup
will
also call activeGroup
(so the activation system must
accept idempotent calls to that method), but the
ActivationMonitor
proxy returned by that call will not be
used.id
- the activation group identifierdata
- group initialization data (ignored)RemoteException
- if the group could not be exported or
made active, or proxy preparation failsActivationException
- if the constructor was not called
indirectly from createGroup
public static ActivationGroup createGroup(ActivationGroupID id, ActivationGroupDesc desc, long incarnation) throws ActivationException
ActivationGroup
instance and
returns it. An ActivationGroupData
instance is extracted from
the initialization data, and a Configuration
is obtained by
calling
Configuration.Provider.getInstance
with the configuration options from
that instance. A LoginContext
is obtained from the
loginContext
configuration entry, if one exists; if the
value is not null
, a login is performed on that context,
and the resulting Subject
(set to be read-only) is used as the
subject when executing the rest of this method. The subject is also
used for all subsequent remote calls by this class to the
ActivationMonitor
. The ActivationSystem
proxy
(obtained from the ActivationGroupID
) is passed to the
ProxyPreparer
given by the systemPreparer
configuration entry, if one exists; a new
ActivationGroupID
is constructed with the resulting proxy.
An Exporter
instance is obtained from the
instantiatorExporter
configuration entry, if one exists;
this exporter will be used (in the constructor of this class) to export
the group. A ProxyPreparer
instance is obtained from the
monitorPreparer
configuration entry, if one exists; this
preparer will be used (in the constructor of this class) to prepare the
ActivationMonitor
. A call is then made to
ActivationGroup.createGroup
with
the new group identifier, the activation group descriptor, and the
group incarnation number, and the result of that call is returned.id
- the activation group identifierdesc
- the activation group descriptorincarnation
- the group's incarnation number (zero on initial
creation)ActivationException
- if a group already exists or if an
exception occurs during group creationCopyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.