com.sun.jini.norm
Class ActivatableNormServerImpl

java.lang.Object
  extended by com.sun.jini.norm.NormServerBaseImpl
      extended by com.sun.jini.norm.ActivatableNormServerImpl
All Implemented Interfaces:
DestroyAdmin, Landlord, LocalLandlord, NormServer, ServiceProxyAccessor, Remote, Administrable, JoinAdmin, ProxyAccessor, LeaseRenewalService, ServerProxyTrust

 class ActivatableNormServerImpl
extends NormServerBaseImpl

Provides an activatable implementation of NormServer.

Since:
2.0
Author:
Sun Microsystems, Inc.

Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.jini.norm.NormServerBaseImpl
NormServerBaseImpl.InitException
 
Nested classes/interfaces inherited from interface com.sun.jini.landlord.Landlord
Landlord.RenewResults
 
Field Summary
private  ActivationID activationID
          Our activation ID
private  ActivationSystem activationSystem
          The activation system, prepared
 
Fields inherited from class com.sun.jini.norm.NormServerBaseImpl
exporter, logger, loginContext, NORM, normProxy, persistenceDirectory, persistent, serverProxy
 
Fields inherited from interface com.sun.jini.norm.NormServer
NO_LISTENER
 
Constructor Summary
ActivatableNormServerImpl(ActivationID activationID, MarshalledObject data)
          Provides a constructor for an activatable implementation of NormServer suitable for use with ServiceStarter.
 
Method Summary
 void destroy()
          Destroy the service, if possible, including its persistent storage.
(package private)  Exporter getExporter(Configuration config)
          Returns the exporter to use to export this server.
(package private)  void initAsSubject(Configuration config)
          Common construction for activatable and non-activatable cases, run under the proper Subject.
(package private)  void postDestroy()
          Method subclasses can override to perform any necessary post log destruction cleanup.
 
Methods inherited from class com.sun.jini.norm.NormServerBaseImpl
addLookupAttributes, addLookupGroups, addLookupLocators, cancel, cancelAll, createLeaseRenewalSet, desiredExpirationReached, expireIfTime, getAdmin, getLeases, getLookupAttributes, getLookupGroups, getLookupLocators, getProxy, getProxyVerifier, getServiceProxy, init, initFailed, isolateSets, modifyLookupAttributes, newSendMonitor, newSetProxy, remove, removeLookupGroups, removeLookupLocators, renew, renewalFailure, renewAll, renewFor, restoreTransientState, sendWarningEvent, setExpirationWarningListener, setLookupGroups, setLookupLocators, setRenewalFailureListener, toString, unexport, updateLeaseCount, updatePerformed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

activationID

private ActivationID activationID
Our activation ID


activationSystem

private ActivationSystem activationSystem
The activation system, prepared

Constructor Detail

ActivatableNormServerImpl

ActivatableNormServerImpl(ActivationID activationID,
                          MarshalledObject data)
                    throws Exception
Provides a constructor for an activatable implementation of NormServer suitable for use with ServiceStarter.

Parameters:
activationID - activation ID passed in by the activation daemon
data - state data needed to re-activate a Norm server
Throws:
Exception - if there is a problem creating the server
Method Detail

destroy

public void destroy()
             throws RemoteException
Description copied from interface: DestroyAdmin
Destroy the service, if possible, including its persistent storage. 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 service 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 itself. Once this method has been called, the service can, but need not, reject all other (in-progress and subsequent) remote calls to the service.

Specified by:
destroy in interface DestroyAdmin
Overrides:
destroy in class NormServerBaseImpl
Throws:
RemoteException

postDestroy

void postDestroy()
Description copied from class: NormServerBaseImpl
Method subclasses can override to perform any necessary post log destruction cleanup.

Overrides:
postDestroy in class NormServerBaseImpl

initAsSubject

void initAsSubject(Configuration config)
             throws Exception
Description copied from class: NormServerBaseImpl
Common construction for activatable and non-activatable cases, run under the proper Subject.

Overrides:
initAsSubject in class NormServerBaseImpl
Throws:
Exception

getExporter

Exporter getExporter(Configuration config)
               throws ConfigurationException
Description copied from class: NormServerBaseImpl
Returns the exporter to use to export this server.

Overrides:
getExporter in class NormServerBaseImpl
Parameters:
config - the configuration to use for supplying the exporter
Returns:
the exporter to use to export this server
Throws:
ConfigurationException - if a problem occurs retrieving entries from the configuration


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