com.sun.jini.start
Class SharedGroupImpl

java.lang.Object
  extended by com.sun.jini.start.SharedGroupImpl
All Implemented Interfaces:
ProxyAccessor, ServerProxyTrust

public class SharedGroupImpl
extends Object
implements ServerProxyTrust, ProxyAccessor

The provided implementation of the SharedGroup service. The following items are discussed below:

Configuring SharedGroupImpl

This implementation of SharedGroupImpl supports the following configuration entries, with component com.sun.jini.start:
activationIdPreparer
  Type: ProxyPreparer
  Default: new BasicProxyPreparer()
  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 BasicProxyPreparer()
  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 ActivationExporter(
     activationID,
     new BasicJeriExporter(
         TcpServerEndpoint.getInstance(0),
         new BasicILFactory(), false, true))
 
  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.

Loggers and Logging Levels

The SharedGroupImpl service implementation uses the Logger, named com.sun.jini.sharedGroup. The following table describes the type of information logged as well as the levels of information logged.

com.sun.jini.start.sharedGroup
Level Description
FINE for low level service operation tracing
FINER for lower level service operation tracing
FINEST for lowest level service operation tracing

Author:
Sun Microsystems, Inc.

Field Summary
protected  Exporter exporter
          The exporter for exporting and unexporting
 
Method Summary
 void destroyVM()
          Cause the hosting VM to exit.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

exporter

protected Exporter exporter
The exporter for exporting and unexporting

Method Detail

destroyVM

public void destroyVM()
               throws RemoteException,
                      ActivationException
Description copied from interface: SharedGroup
Cause the hosting VM to exit. This method should (in effect) spawn a separate thread to do the actual work asynchronously, and make a reasonable attempt to let this remote call return successfully. As such, a successful return from this method does not mean that the VM has been destroyed. Although the service should make a reasonable attempt to let this remote call return successfully, the service must not wait indefinitely for other (in-progress and subsequent) remote calls to finish before proceeding to destroy its hosting VM. Once this method has been called, the service can, but need not, reject all other (in-progress and subsequent) remote calls to the service.

Throws:
RemoteException - if there was a problem communicating with the shared group object
ActivationException - if there was a problem creating an activatable shared group instance

getProxy

public Object getProxy()
Description copied from interface: ProxyAccessor
Returns a proxy object for this remote object. If this remote object is not exported (and hence, no proxy is available), then null is returned.

Specified by:
getProxy in interface ProxyAccessor
Returns:
a proxy, or null

getProxyVerifier

public TrustVerifier getProxyVerifier()
Description copied from interface: ServerProxyTrust
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. The verifier should be able to verify all proxies for the service, including proxies for resources (such as leases and registrations).

Specified by:
getProxyVerifier in interface ServerProxyTrust
Returns:
a TrustVerifier that can be used to verify that a proxy can be trusted as a proxy for the service


Copyright 2007, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.