org.apache.jcs.auxiliary.remote
Class RemoteUtils

java.lang.Object
  extended by org.apache.jcs.auxiliary.remote.RemoteUtils

public class RemoteUtils
extends java.lang.Object

This class provides some basic utilities for doing things such as starting the registry properly.


Method Summary
static void configureGlobalCustomSocketFactory(int timeoutMillis)
          Configure a custom socket factory to set the timeout value.
static int createRegistry(int port)
          Creates and exports a registry on the specified port of the local host.
static java.util.Properties loadProps(java.lang.String propFile)
          Loads properties for the named props file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createRegistry

public static int createRegistry(int port)
                          throws java.rmi.RemoteException
Creates and exports a registry on the specified port of the local host.

Parameters:
port -
Returns:
the port the registry was started on
Throws:
java.rmi.RemoteException

loadProps

public static java.util.Properties loadProps(java.lang.String propFile)
                                      throws java.io.IOException
Loads properties for the named props file.

Parameters:
propFile -
Returns:
The properties object for the file
Throws:
java.io.IOException

configureGlobalCustomSocketFactory

public static void configureGlobalCustomSocketFactory(int timeoutMillis)
Configure a custom socket factory to set the timeout value. This sets the global socket factory. It's used only if a custom factory is not configured for the specific object.

Parameters:
timeoutMillis -


Copyright © 2002-2009 Apache Software Foundation. All Rights Reserved.