1. /*
  2. * @(#)RMIExporter.java 1.3 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.jmx.remote.internal;
  8. import java.rmi.NoSuchObjectException;
  9. import java.rmi.Remote;
  10. import java.rmi.RemoteException;
  11. import java.rmi.server.RMIClientSocketFactory;
  12. import java.rmi.server.RMIServerSocketFactory;
  13. import java.rmi.server.UnicastRemoteObject;
  14. /**
  15. * <p>Unpublished interface controlling how the RMI Connector Server
  16. * exports objects. The RMIServerImpl object and each
  17. * RMIConnectionImpl object are exported using the exporter. The
  18. * default exporter calls {@link
  19. * UnicastRemoteObject#exportObject(Remote, int,
  20. * RMIClientSocketFactory, RMIServerSocketFactory)} to export objects
  21. * and {@link UnicastRemoteObject#unexportObject(Remote, boolean)} to
  22. * unexport them. A replacement exporter can be specified via the
  23. * {@link #EXPORTER_ATTRIBUTE} property in the environment Map passed
  24. * to the RMI connector server.</p>
  25. */
  26. public interface RMIExporter {
  27. public static final String EXPORTER_ATTRIBUTE =
  28. "com.sun.jmx.remote.rmi.exporter";
  29. public Remote exportObject(Remote obj,
  30. int port,
  31. RMIClientSocketFactory csf,
  32. RMIServerSocketFactory ssf)
  33. throws RemoteException;
  34. public boolean unexportObject(Remote obj, boolean force)
  35. throws NoSuchObjectException;
  36. }