cn.nukkit.utils.ThreadedLogger Java Examples
The following examples show how to use
cn.nukkit.utils.ThreadedLogger.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: UDPServerSocket.java From Jupiter with GNU General Public License v3.0 | 6 votes |
public UDPServerSocket(ThreadedLogger logger, int port, String interfaz) { this.logger = logger; try { bootstrap = new Bootstrap(); group = new NioEventLoopGroup(); bootstrap .group(group) .channel(NioDatagramChannel.class) .handler(this); channel = bootstrap.bind(interfaz, port).sync().channel(); } catch (Exception e) { this.logger.critical(FastAppender.get(interfaz, ":", port, " 上でサーバーを開けませんでした。")); this.logger.critical("同じポートで複数のサーバーを一度に開いていませんか?"); System.exit(1); } }
Example #2
Source File: UDPServerSocket.java From Nukkit with GNU General Public License v3.0 | 6 votes |
public UDPServerSocket(ThreadedLogger logger, int port, String interfaz) { this.logger = logger; try { if (Epoll.isAvailable()) { bootstrap = new Bootstrap() .channel(EpollDatagramChannel.class) .option(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT) .handler(this) .group(new EpollEventLoopGroup()); this.logger.info("Epoll is available. EpollEventLoop will be used."); } else { bootstrap = new Bootstrap() .group(new NioEventLoopGroup()) .channel(NioDatagramChannel.class) .option(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT) .handler(this); this.logger.info("Epoll is unavailable. Reverting to NioEventLoop."); } channel = bootstrap.bind(interfaz, port).sync().channel(); } catch (Exception e) { this.logger.critical("**** FAILED TO BIND TO " + interfaz + ":" + port + "!"); this.logger.critical("Perhaps a server is already running on that port?"); System.exit(1); } }
Example #3
Source File: UDPServerSocket.java From Nukkit with GNU General Public License v3.0 | 6 votes |
public UDPServerSocket(ThreadedLogger logger, int port, String interfaz) { this.logger = logger; try { bootstrap = new Bootstrap() .channel(EPOLL ? EpollDatagramChannel.class : NioDatagramChannel.class) .option(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT) .handler(this) .group(EPOLL ? new EpollEventLoopGroup() : new NioEventLoopGroup()); this.logger.info("Epoll Status is " + EPOLL); channel = bootstrap.bind(interfaz, port).sync().channel(); } catch (Exception e) { this.logger.critical("**** FAILED TO BIND TO " + interfaz + ":" + port + "!"); this.logger.critical("Perhaps a server is already running on that port?"); System.exit(1); } }
Example #4
Source File: RakNetServer.java From Nukkit with GNU General Public License v3.0 | 5 votes |
public RakNetServer(ThreadedLogger logger, int port, String interfaz) { this.port = port; if (port < 1 || port > 65536) { throw new IllegalArgumentException("Invalid port range"); } this.interfaz = interfaz; this.logger = logger; this.externalQueue = new ConcurrentLinkedQueue<>(); this.internalQueue = new ConcurrentLinkedQueue<>(); this.start(); }
Example #5
Source File: RakNetServer.java From Jupiter with GNU General Public License v3.0 | 5 votes |
public RakNetServer(ThreadedLogger logger, int port, String interfaz) { this.port = port; if (port < 1 || port > 65536) { throw new IllegalArgumentException("Invalid port range"); } this.interfaz = interfaz; this.logger = logger; this.externalQueue = new ConcurrentLinkedQueue<>(); this.internalQueue = new ConcurrentLinkedQueue<>(); this.start(); }
Example #6
Source File: RakNetServer.java From Nukkit with GNU General Public License v3.0 | 5 votes |
public RakNetServer(ThreadedLogger logger, int port, String interfaz) { this.port = port; if (port < 1 || port > 65536) { throw new IllegalArgumentException("Invalid port range"); } this.interfaz = interfaz; this.logger = logger; this.externalQueue = new ConcurrentLinkedQueue<>(); this.internalQueue = new ConcurrentLinkedQueue<>(); this.start(); }
Example #7
Source File: SynapseClient.java From SynapseAPI with GNU General Public License v3.0 | 5 votes |
public SynapseClient(ThreadedLogger logger, int port, String interfaz) { this.logger = logger; this.interfaz = interfaz; this.port = port; if (port < 1 || port > 65536) { throw new IllegalArgumentException("Invalid port range"); } this.shutdown = false; this.externalQueue = new ConcurrentLinkedQueue<>(); this.internalQueue = new ConcurrentLinkedQueue<>(); this.start(); }
Example #8
Source File: RakNetServer.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public ThreadedLogger getLogger() { return logger; }
Example #9
Source File: UDPServerSocket.java From Jupiter with GNU General Public License v3.0 | 4 votes |
public UDPServerSocket(ThreadedLogger logger) { this(logger, 19132, "0.0.0.0"); }
Example #10
Source File: RakNetServer.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public RakNetServer(ThreadedLogger logger, int port) { this(logger, port, "0.0.0.0"); }
Example #11
Source File: SessionManager.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public ThreadedLogger getLogger() { return this.server.getLogger(); }
Example #12
Source File: UDPServerSocket.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public UDPServerSocket(ThreadedLogger logger, int port) { this(logger, port, "0.0.0.0"); }
Example #13
Source File: UDPServerSocket.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public UDPServerSocket(ThreadedLogger logger) { this(logger, 19132, "0.0.0.0"); }
Example #14
Source File: SynapseClient.java From SynapseAPI with GNU General Public License v3.0 | 4 votes |
public ThreadedLogger getLogger() { return logger; }
Example #15
Source File: SynapseClient.java From SynapseAPI with GNU General Public License v3.0 | 4 votes |
public SynapseClient(ThreadedLogger logger, int port) { this(logger, port, "127.0.0.1"); }
Example #16
Source File: RakNetServer.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public ThreadedLogger getLogger() { return logger; }
Example #17
Source File: RakNetServer.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public RakNetServer(ThreadedLogger logger, int port) { this(logger, port, "0.0.0.0"); }
Example #18
Source File: SessionManager.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public ThreadedLogger getLogger() { return this.server.getLogger(); }
Example #19
Source File: UDPServerSocket.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public UDPServerSocket(ThreadedLogger logger, int port) { this(logger, port, "0.0.0.0"); }
Example #20
Source File: UDPServerSocket.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public UDPServerSocket(ThreadedLogger logger) { this(logger, 19132, "0.0.0.0"); }
Example #21
Source File: RakNetServer.java From Jupiter with GNU General Public License v3.0 | 4 votes |
public ThreadedLogger getLogger() { return logger; }
Example #22
Source File: RakNetServer.java From Jupiter with GNU General Public License v3.0 | 4 votes |
public RakNetServer(ThreadedLogger logger, int port) { this(logger, port, "0.0.0.0"); }
Example #23
Source File: SessionManager.java From Jupiter with GNU General Public License v3.0 | 4 votes |
public ThreadedLogger getLogger() { return this.server.getLogger(); }
Example #24
Source File: UDPServerSocket.java From Jupiter with GNU General Public License v3.0 | 4 votes |
public UDPServerSocket(ThreadedLogger logger, int port) { this(logger, port, "0.0.0.0"); }