cluster5.shared.rmi
Class RMIUtils

java.lang.Object
  extended by cluster5.shared.rmi.RMIUtils

public class RMIUtils
extends java.lang.Object

RMI-related stuff

Author:
ibisek

Constructor Summary
RMIUtils()
           
 
Method Summary
 java.rmi.Remote connectToRMIService(java.lang.String url, int port, java.lang.String name)
          Returns instance of the remote object or null if connection failed.
 java.rmi.registry.Registry createRMIServer(java.lang.String url, int port, java.lang.String name, java.rmi.Remote remoteObject)
          Creates a RMI service by given parameters.
 void disposeRegistry(java.rmi.registry.Registry registry, int port)
          Shall stop a registry.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RMIUtils

public RMIUtils()
Method Detail

createRMIServer

public java.rmi.registry.Registry createRMIServer(java.lang.String url,
                                                  int port,
                                                  java.lang.String name,
                                                  java.rmi.Remote remoteObject)
Creates a RMI service by given parameters.

Returns:
instance of Registry if succeeded, null if failed.

connectToRMIService

public java.rmi.Remote connectToRMIService(java.lang.String url,
                                           int port,
                                           java.lang.String name)
Returns instance of the remote object or null if connection failed.


disposeRegistry

public void disposeRegistry(java.rmi.registry.Registry registry,
                            int port)
Shall stop a registry.

Parameters:
registry -