com.sun.jini.jeri.internal.runtime
Class BasicExportTable

java.lang.Object
  extended by com.sun.jini.jeri.internal.runtime.BasicExportTable

public final class BasicExportTable
extends Object

An ObjectTable front end for exporting remote objects with a ServerEndpoint as the producer of InboundRequests. A BasicExportTable manages a pool of ServerEndpoint.ListenEndpoints being listened on.

Author:
Sun Microsystems, Inc.

Nested Class Summary
static class BasicExportTable.Entry
          Represents a remote object exported to this BasicExportTable.
private  class BasicExportTable.LC
          Collects the ListenEndpoints associated with a ServerEndpoint and gets the corresponding bindings using the listen pool.
 
Field Summary
private  java.util.concurrent.ConcurrentMap<SameClassKey,Binding> listenPool
          pool of endpoints that we're listening on: maps SameClassKey(ServerEndpoint.ListenEndpoint) to Binding.
private  ObjectTable objectTable
          underlying object table
 
Constructor Summary
BasicExportTable()
          Creates a new instance.
 
Method Summary
 BasicExportTable.Entry export(Remote impl, ServerEndpoint serverEndpoint, boolean allowDGC, boolean keepAlive, Uuid id)
          Exports a remote object to this BasicExportTable.
private  Binding getBinding(ServerEndpoint.ListenEndpoint listenEndpoint)
          Returns the binding for the specified ListenEndpoint, by returning the one already in the listen pool, if any, or else by creating a new one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

objectTable

private final ObjectTable objectTable
underlying object table


listenPool

private final java.util.concurrent.ConcurrentMap<SameClassKey,Binding> listenPool
pool of endpoints that we're listening on: maps SameClassKey(ServerEndpoint.ListenEndpoint) to Binding. A binding removes itself from the listen pool.

Constructor Detail

BasicExportTable

public BasicExportTable()
Creates a new instance.

Method Detail

export

public BasicExportTable.Entry export(Remote impl,
                                     ServerEndpoint serverEndpoint,
                                     boolean allowDGC,
                                     boolean keepAlive,
                                     Uuid id)
                              throws ExportException
Exports a remote object to this BasicExportTable.

Throws:
ExportException

getBinding

private Binding getBinding(ServerEndpoint.ListenEndpoint listenEndpoint)
                    throws IOException
Returns the binding for the specified ListenEndpoint, by returning the one already in the listen pool, if any, or else by creating a new one. If a Binding is returned, its exportsInProgress field will have been incremented.

Throws:
IOException


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