org.zodiac.sdk.simplenetty.factory.ChannelFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zodiac-sdk-nio Show documentation
Show all versions of zodiac-sdk-nio Show documentation
Zodiac SDK NIO2(New Non-Blocking IO)
package org.zodiac.sdk.simplenetty.factory;
import java.lang.reflect.InvocationTargetException;
import org.zodiac.sdk.simplenetty.core.EventLoop;
public class ChannelFactory {
public static T create(Class tClass, EventLoop eventLoop) {
try {
return tClass.getDeclaredConstructor(EventLoop.class).newInstance(eventLoop);
} catch (NoSuchMethodException | IllegalAccessException | InstantiationException
| InvocationTargetException e) {
e.printStackTrace();
}
return null;
}
}