public class RemoteProxyFactory extends Object
Modifier and Type | Field and Description |
---|---|
protected static int |
PORT |
protected static String |
REGISTRY_IP |
Constructor and Description |
---|
RemoteProxyFactory() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
createProxy(Class<T> serviceInterface)
Create a RMI proxy on the wanted service interface.
|
static <T> T |
createProxy(String rmiName,
Class<T> serviceInterface)
Create a RMI proxy on the wanted service interface.
|
protected static final int PORT
protected static final String REGISTRY_IP
public static <T> T createProxy(Class<T> serviceInterface) throws RemoteException, NotBoundException
T
- some interface classserviceInterface
- The class of the service proxy to createRemoteException
- in case the registry is not reachableNotBoundException
- if the default RMI name cannot be found in the
registrypublic static <T> T createProxy(String rmiName, Class<T> serviceInterface) throws RemoteException, NotBoundException
T
- some interface classrmiName
- The specific RMI name to use to find the service
in the registryserviceInterface
- The class of the service proxy to createRemoteException
- in case the registry is not reachableNotBoundException
- if the default RMI name cannot be found in the
registryCopyright © 2004–2020 CodeLutin. All rights reserved.