GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Overview
  • Use
  • Tree
  • Deprecated
  • Index
  • Search
  • Help
  • io.netty.bootstrap
  • ServerBootstrap

This view

  • Original page
  • New address

GeezerVison is showing netty.io — ServerBootstrap (Netty API Reference (4.1.141.Final))

Class ServerBootstrap

java.lang.Object
io.netty.bootstrap.AbstractBootstrap<ServerBootstrap, ServerChannel>
io.netty.bootstrap.ServerBootstrap
All Implemented Interfaces:
Cloneable

public class ServerBootstrap extends AbstractBootstrap<ServerBootstrap, ServerChannel>
Bootstrap sub-class which allows easy bootstrap of ServerChannel
  • Constructor Summary

    Constructors
    Constructor
    Description
    ServerBootstrap()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> ServerBootstrap
    childAttr(AttributeKey<T> childKey, T value)
    Set the specific AttributeKey with the given value on every child Channel.
    EventLoopGroup
    childGroup()
    Deprecated.
    Use config() instead.
    ServerBootstrap
    childHandler(ChannelHandler childHandler)
    Set the ChannelHandler which is used to serve the request for the Channel's.
    <T> ServerBootstrap
    childOption(ChannelOption<T> childOption, T value)
    Allow to specify a ChannelOption which is used for the Channel instances once they get created (after the acceptor accepted the Channel).
    ServerBootstrap
    clone()
    Returns a deep clone of this bootstrap which has the identical configuration.
    final ServerBootstrapConfig
    config()
    Returns the AbstractBootstrapConfig object that can be used to obtain the current config of the bootstrap.
    ServerBootstrap
    group(EventLoopGroup group)
    Specify the EventLoopGroup which is used for the parent (acceptor) and the child (client).
    ServerBootstrap
    group(EventLoopGroup parentGroup, EventLoopGroup childGroup)
    Set the EventLoopGroup for the parent (acceptor) and the child (client).
    ServerBootstrap
    validate()
    Validate all the parameters.

    Methods inherited from class AbstractBootstrap

    attr, bind, bind, bind, bind, bind, channel, channelFactory, channelFactory, extensionsClassLoader, group, handler, localAddress, localAddress, localAddress, localAddress, option, register, toString
    Modifier and Type
    Method
    Description
    <T> ServerBootstrap
    attr(AttributeKey<T> key, T value)
    Allow to specify an initial attribute of the newly created Channel.
    ChannelFuture
    bind()
    Create a new Channel and bind it.
    ChannelFuture
    bind(int inetPort)
    Create a new Channel and bind it.
    ChannelFuture
    bind(String inetHost, int inetPort)
    Create a new Channel and bind it.
    ChannelFuture
    bind(InetAddress inetHost, int inetPort)
    Create a new Channel and bind it.
    ChannelFuture
    bind(SocketAddress localAddress)
    Create a new Channel and bind it.
    ServerBootstrap
    channel(Class<? extends ServerChannel> channelClass)
    The Class which is used to create Channel instances from.
    ServerBootstrap
    channelFactory(ChannelFactory<? extends ServerChannel> channelFactory)
    Deprecated.
    Use AbstractBootstrap.channelFactory(io.netty.channel.ChannelFactory) instead.
    ServerBootstrap
    channelFactory(ChannelFactory<? extends ServerChannel> channelFactory)
    ChannelFactory which is used to create Channel instances from when calling AbstractBootstrap.bind().
    ServerBootstrap
    extensionsClassLoader(ClassLoader classLoader)
    Load ChannelInitializerExtensions using the given class loader.
    final EventLoopGroup
    group()
    Deprecated.
    Use AbstractBootstrap.config() instead.
    ServerBootstrap
    handler(ChannelHandler handler)
    the ChannelHandler to use for serving the requests.
    ServerBootstrap
    localAddress(int inetPort)
     
    ServerBootstrap
    localAddress(String inetHost, int inetPort)
     
    ServerBootstrap
    localAddress(InetAddress inetHost, int inetPort)
     
    ServerBootstrap
    localAddress(SocketAddress localAddress)
    The SocketAddress which is used to bind the local "end" to.
    <T> ServerBootstrap
    option(ChannelOption<T> option, T value)
    Allow to specify a ChannelOption which is used for the Channel instances once they got created.
    ChannelFuture
    register()
    Create a new Channel and register it with an EventLoop.
    String
    toString()
     

    Methods inherited from class Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ServerBootstrap

      public ServerBootstrap()
  • Method Details

    • group

      public ServerBootstrap group(EventLoopGroup group)
      Specify the EventLoopGroup which is used for the parent (acceptor) and the child (client).
      Overrides:
      group in class AbstractBootstrap<ServerBootstrap, ServerChannel>
    • group

      public ServerBootstrap group(EventLoopGroup parentGroup, EventLoopGroup childGroup)
      Set the EventLoopGroup for the parent (acceptor) and the child (client). These EventLoopGroup's are used to handle all the events and IO for ServerChannel and Channel's.

      Important: Usually this is only useful for advanced use-cases and usually group(EventLoopGroup) is the preferred way to configure the group.

    • childOption

      public <T> ServerBootstrap childOption(ChannelOption<T> childOption, T value)
      Allow to specify a ChannelOption which is used for the Channel instances once they get created (after the acceptor accepted the Channel). Use a value of null to remove a previous set ChannelOption.
    • childAttr

      public <T> ServerBootstrap childAttr(AttributeKey<T> childKey, T value)
      Set the specific AttributeKey with the given value on every child Channel. If the value is null the AttributeKey is removed
    • childHandler

      public ServerBootstrap childHandler(ChannelHandler childHandler)
      Set the ChannelHandler which is used to serve the request for the Channel's.
    • validate

      public ServerBootstrap validate()
      Description copied from class: AbstractBootstrap
      Validate all the parameters. Sub-classes may override this, but should call the super method in that case.
      Overrides:
      validate in class AbstractBootstrap<ServerBootstrap, ServerChannel>
    • clone

      public ServerBootstrap clone()
      Description copied from class: AbstractBootstrap
      Returns a deep clone of this bootstrap which has the identical configuration. This method is useful when making multiple Channels with similar settings. Please note that this method does not clone the EventLoopGroup deeply but shallowly, making the group a shared resource.
      Specified by:
      clone in class AbstractBootstrap<ServerBootstrap, ServerChannel>
    • childGroup

      @Deprecated public EventLoopGroup childGroup()
      Deprecated.
      Use config() instead.
      Return the configured EventLoopGroup which will be used for the child channels or null if non is configured yet.
    • config

      public final ServerBootstrapConfig config()
      Description copied from class: AbstractBootstrap
      Returns the AbstractBootstrapConfig object that can be used to obtain the current config of the bootstrap.
      Specified by:
      config in class AbstractBootstrap<ServerBootstrap, ServerChannel>
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.