|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuiton.util.rmi.ServiceExporter
public final class ServiceExporter
This class allows to make some service available throw RMI. For each service, a wrapper will be created which will be put in the RMI registry. This wrapper will intercept calls to the service and delegate them to it.
| Constructor Summary | |
|---|---|
ServiceExporter()
|
|
| Method Summary | ||
|---|---|---|
protected static Registry |
getRegistry()
Will look for the RMI registry. |
|
static
|
registerService(Class<E> serviceInterface,
E instance)
Will register a service using the default name. |
|
static
|
registerService(String rmiName,
E instance)
Will register a service using the given RMI name. |
|
protected static void |
testRmiConfig()
Does some checks on RMI configuration |
|
static void |
unregisterService(Class<?> serviceInterface)
Will unregister a service using the default name. |
|
static void |
unregisterService(String rmiName)
Will unregister a service using the given RMI name. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServiceExporter()
| Method Detail |
|---|
protected static void testRmiConfig()
protected static Registry getRegistry()
throws RemoteException
RemoteException - in case it is not possible to get the registry
public static <E> void registerService(Class<E> serviceInterface,
E instance)
throws RemoteException
E - some interface classserviceInterface - the interface used to bind the service. The RMI
name will be generated from this class nameinstance - the service instance to bind
RemoteException - in case the registry is not reachable
public static <E> void registerService(String rmiName,
E instance)
throws RemoteException
E - some interface classrmiName - the RMI name used to bind the service in the registryinstance - the service instance to bind
RemoteException - in case the registry is not reachable
public static void unregisterService(Class<?> serviceInterface)
throws RemoteException,
NotBoundException
serviceInterface - the interface used to unbind the service. The RMI
name will be generated from this class name
RemoteException - in case the registry is not reachable
NotBoundException - in case the given name is not bound
public static void unregisterService(String rmiName)
throws RemoteException,
NotBoundException
rmiName - the RMI name used to unbind the service in the registry
RemoteException - in case the registry is not reachable
NotBoundException - in case the given name is not bound
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||