Search in sources :

Example 1 with ClientNodeImpl

use of org.evosuite.rmi.service.ClientNodeImpl in project evosuite by EvoSuite.

the class ClientServices method registerServices.

public boolean registerServices() {
    UtilsRMI.ensureRegistryOnLoopbackAddress();
    try {
        int port = Properties.PROCESS_COMMUNICATION_PORT;
        Registry registry = LocateRegistry.getRegistry(port);
        clientNode = new ClientNodeImpl(registry);
        ClientNodeRemote stub = (ClientNodeRemote) UtilsRMI.exportObject(clientNode);
        registry.rebind(clientNode.getClientRmiIdentifier(), stub);
        return clientNode.init();
    } catch (Exception e) {
        logger.error("Failed to register client services", e);
        return false;
    }
}
Also used : ClientNodeRemote(org.evosuite.rmi.service.ClientNodeRemote) LocateRegistry(java.rmi.registry.LocateRegistry) Registry(java.rmi.registry.Registry) ClientNodeImpl(org.evosuite.rmi.service.ClientNodeImpl) DummyClientNodeImpl(org.evosuite.rmi.service.DummyClientNodeImpl) NoSuchObjectException(java.rmi.NoSuchObjectException)

Aggregations

NoSuchObjectException (java.rmi.NoSuchObjectException)1 LocateRegistry (java.rmi.registry.LocateRegistry)1 Registry (java.rmi.registry.Registry)1 ClientNodeImpl (org.evosuite.rmi.service.ClientNodeImpl)1 ClientNodeRemote (org.evosuite.rmi.service.ClientNodeRemote)1 DummyClientNodeImpl (org.evosuite.rmi.service.DummyClientNodeImpl)1