net.jini.jeri
Class BasicJeriExporter.ImplContainer

java.lang.Object
  extended by net.jini.jeri.BasicJeriExporter.ImplContainer
Enclosing class:
BasicJeriExporter

private static class BasicJeriExporter.ImplContainer
extends Object

Container for an impl object. BasicJeriExporter, when exporting an impl, passes an impl container to the package-private BasicObjectEndpoint constructor so that the BasicObjectEndpoint can reference the impl strongly (through the container) while the object is exported. The BasicJeriExporter instance holds onto the impl container weakly so it won't prevent the impl from being garbage collected; only the local stub that references the BasicObjectEndpoint will prevent the impl from being garbage collected. If the object is explicitly unexported via BasicJeriExporter, the BasicJeriExporter instance clears the impl field (if the container hasn't been garbage collected) so a reachable stub that references the container (via the BasicObjectEndpoint in the stub) will not prevent the impl from being garbage collected.


Field Summary
private  Object impl
           
 
Constructor Summary
BasicJeriExporter.ImplContainer(Object impl)
           
 
Method Summary
(package private)  void clearImpl()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

impl

private Object impl
Constructor Detail

BasicJeriExporter.ImplContainer

BasicJeriExporter.ImplContainer(Object impl)
Method Detail

clearImpl

void clearImpl()


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