|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.healthmarketscience.rmiio.exporter.RemoteStreamExporter
com.healthmarketscience.rmiio.exporter.DefaultRemoteStreamExporter
public class DefaultRemoteStreamExporter
Default concrete implementation of RemoteStreamExporter which exports the
object for use with with standard RMI, via UnicastRemoteObject.
The default constructor will use a port configured by the system property
PORT_PROPERTY if one is found, otherwise ANY_PORT will be
used.
| Field Summary | |
|---|---|
static int |
ANY_PORT
constant indicating that export can use any port |
static String |
PORT_PROPERTY
system property used to determine the port to use for the default constructor. |
| Fields inherited from class com.healthmarketscience.rmiio.exporter.RemoteStreamExporter |
|---|
DEFAULT_EXPORTER_CLASS_NAME, EXPORTER_PROPERTY, LOG |
| Constructor Summary | |
|---|---|
DefaultRemoteStreamExporter()
|
|
DefaultRemoteStreamExporter(int port)
|
|
| Method Summary | |
|---|---|
protected Object |
exportImpl(RemoteStreamServer<?,?> server)
Called by RemoteStreamExporter.export(StreamServerType) to do the actual export work for the relevant
RPC framework. |
int |
getPort()
|
protected void |
unexportImpl(RemoteStreamServer<?,?> server)
Called by RemoteStreamExporter.unexport(com.healthmarketscience.rmiio.RemoteStreamServer, ?>) to do the actual unexport work for the
relevant RPC framework. |
| Methods inherited from class com.healthmarketscience.rmiio.exporter.RemoteStreamExporter |
|---|
export, getInstance, unexport |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ANY_PORT
public static final String PORT_PROPERTY
ANY_PORT is used.
| Constructor Detail |
|---|
public DefaultRemoteStreamExporter()
public DefaultRemoteStreamExporter(int port)
| Method Detail |
|---|
public int getPort()
protected Object exportImpl(RemoteStreamServer<?,?> server)
throws RemoteException
RemoteStreamExporterRemoteStreamExporter.export(StreamServerType) to do the actual export work for the relevant
RPC framework. This method will be called synchronized on the given
stream instance, so it will not overlap an RemoteStreamExporter.unexport(com.healthmarketscience.rmiio.RemoteStreamServer, ?>) call for the
same instance.
Note, RemoteStreamServer implements Unreferenced, which is an rmi interface used to clean up servers which have lost their clients. RPC frameworks which export remote streams should attempt to handle abnormal client termination, and are encouraged to make use of the Unreferenced interface to shutdown an orphaned stream server.
exportImpl in class RemoteStreamExporterRemoteException - if the stream instance could not be exported
protected void unexportImpl(RemoteStreamServer<?,?> server)
throws Exception
RemoteStreamExporterRemoteStreamExporter.unexport(com.healthmarketscience.rmiio.RemoteStreamServer, ?>) to do the actual unexport work for the
relevant RPC framework. This method will be called synchronized on the
given stream instance, so it will not overlap an RemoteStreamExporter.export(StreamServerType) call for
the same instance. This method call is allowed break existing
connections to this stream instance. Any exceptions thrown will be
logged, but otherwise ignored.
unexportImpl in class RemoteStreamExporterException - if the unexport failed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||