/** * Creates a new instance with the specified initial {@link ChannelFactory}. */ protected Bootstrap(ChannelFactory channelFactory) { setFactory(channelFactory); }
/** * Sets the {@link ServerChannelFactory} that will be used to perform an I/O * operation. This method can be called only once and can't be called at * all if the factory was specified in the constructor. * * @throws IllegalStateException * if the factory is already set * @throws IllegalArgumentException * if the specified {@code factory} is not a * {@link ServerChannelFactory} */ @Override public void setFactory(ChannelFactory factory) { if (factory == null) { throw new NullPointerException("factory"); } if (!(factory instanceof ServerChannelFactory)) { throw new IllegalArgumentException( "factory must be a " + ServerChannelFactory.class.getSimpleName() + ": " + factory.getClass()); } super.setFactory(factory); }
/** * Creates a new instance with the specified initial {@link ChannelFactory}. */ protected Bootstrap(ChannelFactory channelFactory) { setFactory(channelFactory); }
/** * Sets the {@link ServerChannelFactory} that will be used to perform an I/O * operation. This method can be called only once and can't be called at * all if the factory was specified in the constructor. * * @throws IllegalStateException * if the factory is already set * @throws IllegalArgumentException * if the specified {@code factory} is not a * {@link ServerChannelFactory} */ @Override public void setFactory(ChannelFactory factory) { if (factory == null) { throw new NullPointerException("factory"); } if (!(factory instanceof ServerChannelFactory)) { throw new IllegalArgumentException( "factory must be a " + ServerChannelFactory.class.getSimpleName() + ": " + factory.getClass()); } super.setFactory(factory); }