Search in sources :

Example 6 with ClientNodeRemote

use of org.evosuite.rmi.service.ClientNodeRemote 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

ClientNodeRemote (org.evosuite.rmi.service.ClientNodeRemote)6 RemoteException (java.rmi.RemoteException)5 IOException (java.io.IOException)4 ExternalProcessHandler (org.evosuite.utils.ExternalProcessHandler)4 LoggingUtils (org.evosuite.utils.LoggingUtils)4 ArrayList (java.util.ArrayList)3 ClientProcess (org.evosuite.ClientProcess)2 File (java.io.File)1 NoSuchObjectException (java.rmi.NoSuchObjectException)1 LocateRegistry (java.rmi.registry.LocateRegistry)1 Registry (java.rmi.registry.Registry)1 ResourceList (org.evosuite.classpath.ResourceList)1 TestGenerationResult (org.evosuite.result.TestGenerationResult)1 ClientNodeImpl (org.evosuite.rmi.service.ClientNodeImpl)1 DummyClientNodeImpl (org.evosuite.rmi.service.DummyClientNodeImpl)1