Optional<Integer> port = Optional.absent();
return jsonSocketServer(checkNotNull(resource, "resource should not be null"), port);
}
private static SocketServer jsonSocketServer(final Resource resource, final Optional<Integer> port) {
SocketServerParser parser = new SocketServerParser();
return parser.parseServer(toStream(resource), port);
}