org.objectweb.carol.irmi
Class CountSocketFactory
java.lang.Object
java.rmi.server.RMISocketFactory
org.objectweb.carol.irmi.CountSocketFactory
- All Implemented Interfaces:
- java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory
- public class CountSocketFactory
- extends java.rmi.server.RMISocketFactory
CountSocketFactory is an RMISocketFactory
implementation
that uses CountOutputStream
and CountInputStream
to
record the time and number of bytes involved in the I/O operations
of any RMI implementation that uses RMISocketFactory
. This
class uses the Timer
class to record timing information and
report results.
- Author:
- Rafael H. Schloming <rhs@mit.edu>
- See Also:
Timer
Method Summary |
java.net.ServerSocket |
createServerSocket(int port)
|
java.net.Socket |
createSocket(java.lang.String host,
int port)
|
static void |
install()
Static utility method used to install an instance of
CountSocketFactory as the current RMISocketFactory. |
Methods inherited from class java.rmi.server.RMISocketFactory |
getDefaultSocketFactory, getFailureHandler, getSocketFactory, setFailureHandler, setSocketFactory |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
install
public static final void install()
Static utility method used to install an instance of
CountSocketFactory as the current RMISocketFactory. Note that
the RMISocketFactory.setSocketFactory(RMISocketFactory)
can only be set once, and must be set before any RMI operations
have been performed. Therefore this method must be called
exactly once near the beginning of a programs execution in
order for the results reported to be accurate. This method is
just a convenience for calling:
RMISocketFactory.setSocketFactory(new CountSocketFactory());
createServerSocket
public java.net.ServerSocket createServerSocket(int port)
throws java.io.IOException
- Throws:
java.io.IOException
createSocket
public java.net.Socket createSocket(java.lang.String host,
int port)
throws java.io.IOException
- Throws:
java.io.IOException