MCPcopy Create free account
hub / github.com/apache/cloudstack / init

Method init

utils/src/main/java/com/cloud/utils/nio/NioServer.java:52–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50 }
51
52 @Override
53 protected void init() throws IOException {
54 _selector = SelectorProvider.provider().openSelector();
55
56 serverSocket = ServerSocketChannel.open();
57 serverSocket.configureBlocking(false);
58
59 localAddress = new InetSocketAddress(_port);
60 serverSocket.socket().bind(localAddress);
61
62 serverSocket.register(_selector, SelectionKey.OP_ACCEPT, null);
63
64 logger.info("NioServer started and listening on {}", serverSocket.socket().getLocalSocketAddress());
65 }
66
67 @Override
68 public void cleanUp() throws IOException {

Callers

nothing calls this directly

Calls 3

registerMethod · 0.65
openMethod · 0.45
infoMethod · 0.45

Tested by

no test coverage detected