public class SharedGroupImpl extends Object implements SharedGroupBackEnd, ServerProxyTrust, ProxyAccessor
SharedGroup
service.
The following items are discussed below:
SharedGroupImpl
supports the
following configuration entries, with component
com.sun.jini.start
:
• |
activationIdPreparer
| |
---|---|---|
  | Type: | ProxyPreparer
|
  | Default: |
new
|
  | Description: | The proxy preparer for the service's activation
ID. The value should not be null .
The service starter calls the
activate method to activate the service.
|
• |
activationSystemPreparer
| |
---|---|---|
  | Type: | ProxyPreparer
|
  | Default: |
new
|
  | Description: | The proxy preparer for the proxy for the
activation system. The value should not be null . This
entry is obtained at service start and restart.
The service calls the unregisterGroup method on the ActivationSystem upon service destruction.
|
• |
exporter
| |
---|---|---|
  | Type: | Exporter
|
  | Default: |
new |
  | Description: | The object to use for exporting the service. The
value should not be null . The call to
getEntry will supply the activation ID in
the data argument. This entry is obtained at service
start and restart.
|
• |
loginContext
| |
---|---|---|
  | Type: | LoginContext
|
  | Default: | null
|
  | Description: | If not null , specifies the JAAS
login context to use for performing a JAAS login and supplying the
Subject to use when running the
service. If null , no JAAS login is performed. This
entry is obtained at service start and restart.
|
Logger
, named com.sun.jini.sharedGroup
.
The following table describes the
type of information logged as well as the levels of information logged.
Level | Description |
---|---|
FINE | for low level service operation tracing |
FINER | for lower level service operation tracing |
FINEST | for lowest level service operation tracing |
Modifier and Type | Class and Description |
---|---|
private class |
SharedGroupImpl.DestroyThread
Termination thread code.
|
Modifier and Type | Field and Description |
---|---|
private ActivationID |
activationID
Our prepared activation ID reference
|
private ActivationSystem |
activationSystem
The prepared activation system reference
|
protected Exporter |
exporter
The exporter for exporting and unexporting
|
private static Logger |
logger
Configure logger
|
private LoginContext |
loginContext
LoginContext for this service. |
private Remote |
ourStub
The inner proxy of this server
|
private static String |
START_PACKAGE
Component name for configuration entries
|
Modifier | Constructor and Description |
---|---|
private |
SharedGroupImpl(ActivationID activationID,
MarshalledObject data)
Activation constructor.
|
Modifier and Type | Method and Description |
---|---|
private void |
cleanup()
Private utility method which attempts to roll back from
from a failed initialization attempt.
|
void |
destroyVM()
Cause the hosting VM to exit.
|
private void |
doInit(Configuration config) |
private void |
doInitWithLogin(Configuration config,
LoginContext loginContext) |
Object |
getProxy()
Returns a proxy object for this remote object.
|
TrustVerifier |
getProxyVerifier()
Returns a
TrustVerifier that can be used to verify that
a proxy can be trusted as a proxy for the service; that is, the
isTrustedObject method of the
returned verifier can be called with a candidate proxy. |
private static final String START_PACKAGE
private static final Logger logger
private ActivationID activationID
private ActivationSystem activationSystem
private Remote ourStub
private final LoginContext loginContext
LoginContext
for this service.protected Exporter exporter
private SharedGroupImpl(ActivationID activationID, MarshalledObject data) throws Exception
Exception
private void doInitWithLogin(Configuration config, LoginContext loginContext) throws Exception
Exception
private void doInit(Configuration config) throws Exception
Exception
public void destroyVM() throws RemoteException, ActivationException
SharedGroup
destroyVM
in interface SharedGroup
RemoteException
- if there was a problem communicating with
the shared group objectActivationException
- if there was a problem creating an
activatable shared group instanceprivate void cleanup()
public Object getProxy()
ProxyAccessor
null
is returned.getProxy
in interface ProxyAccessor
null
public TrustVerifier getProxyVerifier()
ServerProxyTrust
TrustVerifier
that can be used to verify that
a proxy can be trusted as a proxy for the service; that is, the
isTrustedObject
method of the
returned verifier can be called with a candidate proxy. The verifier
should be able to verify all proxies for the service, including
proxies for resources (such as leases and registrations).getProxyVerifier
in interface ServerProxyTrust
TrustVerifier
that can be used to verify that
a proxy can be trusted as a proxy for the serviceCopyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.