All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.thorbenkuck.netcom2.auto.NativeClientFactoryFinalizer Maven / Gradle / Ivy

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