Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
This artifact provides a single jar that contains all classes required to use remote EJB and JMS, including
all dependencies. It is intended for use by those not using maven, maven users should just import the EJB and
JMS BOM's instead (shaded JAR's cause lots of problems with maven, as it is very easy to inadvertently end up
with different versions on classes on the class path).
/*
* JBoss, Home of Professional Open Source
*
* Copyright 2014 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.xnio.nio;
import java.io.Closeable;
import java.io.IOException;
import java.nio.channels.Selector;
import java.nio.channels.spi.SelectorProvider;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import org.xnio.FileSystemWatcher;
import org.xnio.IoUtils;
import org.xnio.Options;
import org.xnio.Xnio;
import org.xnio.OptionMap;
import org.xnio.XnioWorker;
import org.xnio.management.XnioProviderMXBean;
import org.xnio.management.XnioServerMXBean;
import org.xnio.management.XnioWorkerMXBean;
import static org.xnio.nio.Log.log;
/**
* An NIO-based XNIO provider for a standalone application.
*/
final class NioXnio extends Xnio {
static final boolean IS_HP_UX;
static final boolean HAS_BUGGY_EVENT_PORT;
interface SelectorCreator {
Selector open() throws IOException;
}
final SelectorCreator tempSelectorCreator;
final SelectorCreator mainSelectorCreator;
static {
log.greeting(Version.getVersionString());
IS_HP_UX = AccessController.doPrivileged(new PrivilegedAction() {
public Boolean run() {
final String bugLevel = System.getProperty("sun.nio.ch.bugLevel");
if (bugLevel == null) System.setProperty("sun.nio.ch.bugLevel", "");
return Boolean.valueOf(System.getProperty("os.name", "unknown").equalsIgnoreCase("hp-ux"));
}
}).booleanValue();
// if a JDK is released with a fix, we can try to detect it and set this to "false" for those JDKs.
HAS_BUGGY_EVENT_PORT = true;
}
/**
* Construct a new NIO-based XNIO provider instance. Should only be invoked by the service loader.
*/
NioXnio() {
super("nio");
final Object[] objects = AccessController.doPrivileged(
new PrivilegedAction