use of org.gradle.internal.dispatch.MethodInvocation in project gradle by gradle.
the class MessageHubBackedObjectConnection method connect.
public void connect() {
ClassLoader methodParamClassLoader;
if (methodParamClassLoaders.size() == 0) {
methodParamClassLoader = getClass().getClassLoader();
} else if (methodParamClassLoaders.size() == 1) {
methodParamClassLoader = CollectionUtils.single(methodParamClassLoaders);
} else {
methodParamClassLoader = new CachingClassLoader(new MultiParentClassLoader(methodParamClassLoaders));
}
MethodArgsSerializer argsSerializer = new DefaultMethodArgsSerializer(paramSerializers, new JavaSerializationBackedMethodArgsSerializer(methodParamClassLoader));
StatefulSerializer<InterHubMessage> serializer = new InterHubMessageSerializer(new TypeSafeSerializer<MethodInvocation>(MethodInvocation.class, new MethodInvocationSerializer(methodParamClassLoader, argsSerializer)));
connection = completion.create(serializer);
hub.addConnection(connection);
hub.noFurtherConnections();
completion = null;
}
Aggregations