
com.github.thorbenkuck.netcom2.auto.NativeClientFactoryFinalizer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of NetCom2-Auto Show documentation
Show all versions of NetCom2-Auto Show documentation
Annotation approach to reduce boilerplate code
The newest version!
package com.github.thorbenkuck.netcom2.auto;
import com.github.thorbenkuck.netcom2.exceptions.NetworkInterfaceFactoryException;
import com.github.thorbenkuck.netcom2.exceptions.StartFailedException;
import com.github.thorbenkuck.netcom2.network.client.ClientStart;
final class NativeClientFactoryFinalizer implements ClientFactoryFinalizer {
private final ClientStart clientStart;
NativeClientFactoryFinalizer(ClientStart clientStart) {
this.clientStart = clientStart;
}
@Override
public ClientStart get() {
try {
clientStart.launch();
} catch (StartFailedException e) {
throw new NetworkInterfaceFactoryException(e);
}
return clientStart;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy