Tabnine Logo
System.inheritedChannel
Code IndexAdd Tabnine to your IDE (free)

How to use
inheritedChannel
method
in
java.lang.System

Best Java code snippets using java.lang.System.inheritedChannel (Showing top 20 results out of 315)

origin: fengjiachun/Jupiter

public static Channel inheritedChannel() throws IOException {
  return System.inheritedChannel();
}
origin: fengjiachun/Jupiter

public static Channel inheritedChannel() throws IOException {
  return System.inheritedChannel();
}
origin: org.jupiter-rpc/jupiter-all

public static Channel inheritedChannel() throws IOException {
  return System.inheritedChannel();
}
origin: org.jupiter-rpc/jupiter-flightexec

public static Channel inheritedChannel() throws IOException {
  return System.inheritedChannel();
}
origin: javaee/grizzly

@SuppressWarnings("unchecked")
protected <T> T getSystemInheritedChannel(final Class<?> channelType)
throws IOException {
  final Channel inheritedChannel = System.inheritedChannel();
  if (inheritedChannel == null) {
    throw new IOException("Inherited channel is not set");
  }
  if (!(channelType.isInstance(inheritedChannel))) {
    throw new IOException("Inherited channel is not "
        + channelType.getName()
        + ", but "
        + inheritedChannel.getClass().getName());
  }
  return (T) inheritedChannel;
}
origin: javaee/grizzly

@SuppressWarnings("unchecked")
protected <T> T getSystemInheritedChannel(final Class<?> channelType)
throws IOException {
  final Channel inheritedChannel = System.inheritedChannel();
  if (inheritedChannel == null) {
    throw new IOException("Inherited channel is not set");
  }
  if (!(channelType.isInstance(inheritedChannel))) {
    throw new IOException("Inherited channel is not "
        + channelType.getName()
        + ", but "
        + inheritedChannel.getClass().getName());
  }
  return (T) inheritedChannel;
}
origin: org.glassfish.grizzly/grizzly-websockets-server

@SuppressWarnings("unchecked")
protected <T> T getSystemInheritedChannel(final Class<?> channelType)
throws IOException {
  final Channel inheritedChannel = System.inheritedChannel();
  if (inheritedChannel == null) {
    throw new IOException("Inherited channel is not set");
  }
  if (!(channelType.isInstance(inheritedChannel))) {
    throw new IOException("Inherited channel is not "
        + channelType.getName()
        + ", but "
        + inheritedChannel.getClass().getName());
  }
  return (T) inheritedChannel;
}
origin: javaee/grizzly

@SuppressWarnings("unchecked")
protected <T> T getSystemInheritedChannel(final Class<?> channelType)
throws IOException {
  final Channel inheritedChannel = System.inheritedChannel();
  if (inheritedChannel == null) {
    throw new IOException("Inherited channel is not set");
  }
  if (!(channelType.isInstance(inheritedChannel))) {
    throw new IOException("Inherited channel is not "
        + channelType.getName()
        + ", but "
        + inheritedChannel.getClass().getName());
  }
  return (T) inheritedChannel;
}
origin: javaee/grizzly

@SuppressWarnings("unchecked")
protected <T> T getSystemInheritedChannel(final Class<?> channelType)
throws IOException {
  final Channel inheritedChannel = System.inheritedChannel();
  if (inheritedChannel == null) {
    throw new IOException("Inherited channel is not set");
  }
  if (!(channelType.isInstance(inheritedChannel))) {
    throw new IOException("Inherited channel is not "
        + channelType.getName()
        + ", but "
        + inheritedChannel.getClass().getName());
  }
  return (T) inheritedChannel;
}
origin: javaee/grizzly

@SuppressWarnings("unchecked")
protected <T> T getSystemInheritedChannel(final Class<?> channelType)
throws IOException {
  final Channel inheritedChannel = System.inheritedChannel();
  if (inheritedChannel == null) {
    throw new IOException("Inherited channel is not set");
  }
  if (!(channelType.isInstance(inheritedChannel))) {
    throw new IOException("Inherited channel is not "
        + channelType.getName()
        + ", but "
        + inheritedChannel.getClass().getName());
  }
  return (T) inheritedChannel;
}
origin: javaee/grizzly

@SuppressWarnings("unchecked")
protected <T> T getSystemInheritedChannel(final Class<?> channelType)
throws IOException {
  final Channel inheritedChannel = System.inheritedChannel();
  if (inheritedChannel == null) {
    throw new IOException("Inherited channel is not set");
  }
  if (!(channelType.isInstance(inheritedChannel))) {
    throw new IOException("Inherited channel is not "
        + channelType.getName()
        + ", but "
        + inheritedChannel.getClass().getName());
  }
  return (T) inheritedChannel;
}
origin: javaee/grizzly

@SuppressWarnings("unchecked")
protected <T> T getSystemInheritedChannel(final Class<?> channelType)
throws IOException {
  final Channel inheritedChannel = System.inheritedChannel();
  if (inheritedChannel == null) {
    throw new IOException("Inherited channel is not set");
  }
  if (!(channelType.isInstance(inheritedChannel))) {
    throw new IOException("Inherited channel is not "
        + channelType.getName()
        + ", but "
        + inheritedChannel.getClass().getName());
  }
  return (T) inheritedChannel;
}
origin: javaee/grizzly

@SuppressWarnings("unchecked")
protected <T> T getSystemInheritedChannel(final Class<?> channelType)
throws IOException {
  final Channel inheritedChannel = System.inheritedChannel();
  if (inheritedChannel == null) {
    throw new IOException("Inherited channel is not set");
  }
  if (!(channelType.isInstance(inheritedChannel))) {
    throw new IOException("Inherited channel is not "
        + channelType.getName()
        + ", but "
        + inheritedChannel.getClass().getName());
  }
  return (T) inheritedChannel;
}
origin: org.glassfish.grizzly/grizzly-core

@SuppressWarnings("unchecked")
protected <T> T getSystemInheritedChannel(final Class<?> channelType)
throws IOException {
  final Channel inheritedChannel = System.inheritedChannel();
  if (inheritedChannel == null) {
    throw new IOException("Inherited channel is not set");
  }
  if (!(channelType.isInstance(inheritedChannel))) {
    throw new IOException("Inherited channel is not "
        + channelType.getName()
        + ", but "
        + inheritedChannel.getClass().getName());
  }
  return (T) inheritedChannel;
}
origin: org.mule.glassfish.grizzly/grizzly-framework

@SuppressWarnings("unchecked")
protected <T> T getSystemInheritedChannel(final Class<?> channelType)
throws IOException {
  final Channel inheritedChannel = System.inheritedChannel();
  if (inheritedChannel == null) {
    throw new IOException("Inherited channel is not set");
  }
  if (!(channelType.isInstance(inheritedChannel))) {
    throw new IOException("Inherited channel is not "
        + channelType.getName()
        + ", but "
        + inheritedChannel.getClass().getName());
  }
  return (T) inheritedChannel;
}
origin: org.glassfish.grizzly/grizzly-http-server-core

@SuppressWarnings("unchecked")
protected <T> T getSystemInheritedChannel(final Class<?> channelType)
throws IOException {
  final Channel inheritedChannel = System.inheritedChannel();
  if (inheritedChannel == null) {
    throw new IOException("Inherited channel is not set");
  }
  if (!(channelType.isInstance(inheritedChannel))) {
    throw new IOException("Inherited channel is not "
        + channelType.getName()
        + ", but "
        + inheritedChannel.getClass().getName());
  }
  return (T) inheritedChannel;
}
origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

protected void initServerSocket() throws Exception {
  if (!getUseInheritedChannel()) {
    serverSock = ServerSocketChannel.open();
    socketProperties.setProperties(serverSock.socket());
    InetSocketAddress addr = (getAddress()!=null?new InetSocketAddress(getAddress(),getPort()):new InetSocketAddress(getPort()));
    serverSock.socket().bind(addr,getAcceptCount());
  } else {
    // Retrieve the channel provided by the OS
    Channel ic = System.inheritedChannel();
    if (ic instanceof ServerSocketChannel) {
      serverSock = (ServerSocketChannel) ic;
    }
    if (serverSock == null) {
      throw new IllegalArgumentException(sm.getString("endpoint.init.bind.inherited"));
    }
  }
  serverSock.configureBlocking(true); //mimic APR behavior
}
origin: org.eclipse.jetty.aggregate/jetty-all-server

@Override
public void open() throws IOException
{
  synchronized(this)
  {
    try 
    {
      Channel channel = System.inheritedChannel();
      if ( channel instanceof ServerSocketChannel )
        _acceptChannel = (ServerSocketChannel)channel;
      else
        LOG.warn("Unable to use System.inheritedChannel() [" +channel+ "]. Trying a new ServerSocketChannel at " + getHost() + ":" + getPort());
      
      if ( _acceptChannel != null )
        _acceptChannel.configureBlocking(true);
    }
    catch(NoSuchMethodError e)
    {
      LOG.warn("Need at least Java 5 to use socket inherited from xinetd/inetd.");
    }
    if (_acceptChannel == null)
      super.open();
  }
}
origin: org.eclipse.jetty/server

@Override
public void open() throws IOException
{
  synchronized(this)
  {
    try 
    {
      Channel channel = System.inheritedChannel();
      if ( channel instanceof ServerSocketChannel )
        _acceptChannel = (ServerSocketChannel)channel;
      else
        LOG.warn("Unable to use System.inheritedChannel() [" +channel+ "]. Trying a new ServerSocketChannel at " + getHost() + ":" + getPort());
      
      if ( _acceptChannel != null )
        _acceptChannel.configureBlocking(true);
    }
    catch(NoSuchMethodError e)
    {
      LOG.warn("Need at least Java 5 to use socket inherited from xinetd/inetd.");
    }
    if (_acceptChannel == null)
      super.open();
  }
}
origin: org.eclipse.jetty.aggregate/jetty-webapp

@Override
public void open() throws IOException
{
  synchronized(this)
  {
    try 
    {
      Channel channel = System.inheritedChannel();
      if ( channel instanceof ServerSocketChannel )
        _acceptChannel = (ServerSocketChannel)channel;
      else
        LOG.warn("Unable to use System.inheritedChannel() [" +channel+ "]. Trying a new ServerSocketChannel at " + getHost() + ":" + getPort());
      
      if ( _acceptChannel != null )
        _acceptChannel.configureBlocking(true);
    }
    catch(NoSuchMethodError e)
    {
      LOG.warn("Need at least Java 5 to use socket inherited from xinetd/inetd.");
    }
    if (_acceptChannel == null)
      super.open();
  }
}
java.langSysteminheritedChannel

Javadoc

Returns the inherited channel from the creator of the current virtual machine.

Popular methods of System

  • currentTimeMillis
    Returns the current time in milliseconds. Note that while the unit of time of the return value is a
  • getProperty
    Returns the value of a particular system property. The defaultValue will be returned if no such prop
  • arraycopy
  • exit
  • setProperty
    Sets the value of a particular system property.
  • nanoTime
    Returns the current timestamp of the most precise timer available on the local system, in nanosecond
  • getenv
    Returns the value of the environment variable with the given name, or null if no such variable exist
  • getProperties
    Returns the system properties. Note that this is not a copy, so that changes made to the returned Pr
  • identityHashCode
    Returns an integer hash code for the parameter. The hash code returned is the same one that would be
  • getSecurityManager
    Gets the system security interface.
  • gc
    Indicates to the VM that it would be a good time to run the garbage collector. Note that this is a h
  • lineSeparator
    Returns the system's line separator. On Android, this is "\n". The value comes from the value of the
  • gc,
  • lineSeparator,
  • clearProperty,
  • setOut,
  • setErr,
  • console,
  • loadLibrary,
  • load,
  • setSecurityManager,
  • mapLibraryName

Popular in Java

  • Finding current android device location
  • addToBackStack (FragmentTransaction)
  • getSystemService (Context)
  • setContentView (Activity)
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • JPanel (javax.swing)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now