All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ch.cern.hbase.thirdparty.io.netty.channel.socket.DatagramChannelConfig Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2012 The Netty Project
 *
 * The Netty Project licenses this file to you 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 ch.cern.hbase.thirdparty.io.netty.channel.socket;

import ch.cern.hbase.thirdparty.io.netty.buffer.ByteBufAllocator;
import ch.cern.hbase.thirdparty.io.netty.channel.ChannelConfig;
import ch.cern.hbase.thirdparty.io.netty.channel.ChannelOption;
import ch.cern.hbase.thirdparty.io.netty.channel.MessageSizeEstimator;
import ch.cern.hbase.thirdparty.io.netty.channel.RecvByteBufAllocator;
import ch.cern.hbase.thirdparty.io.netty.channel.WriteBufferWaterMark;

import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.StandardSocketOptions;

/**
 * A {@link ChannelConfig} for a {@link DatagramChannel}.
 *
 * 

Available options

* * In addition to the options provided by {@link ChannelConfig}, * {@link DatagramChannelConfig} allows the following options in the option map: * * * * * * * * * * * * * * * * * * * * * * * * * *
NameAssociated setter method
{@link ChannelOption#SO_BROADCAST}{@link #setBroadcast(boolean)}
{@link ChannelOption#IP_MULTICAST_ADDR}{@link #setInterface(InetAddress)}
{@link ChannelOption#IP_MULTICAST_LOOP_DISABLED}{@link #setLoopbackModeDisabled(boolean)}
{@link ChannelOption#IP_MULTICAST_IF}{@link #setNetworkInterface(NetworkInterface)}
{@link ChannelOption#SO_REUSEADDR}{@link #setReuseAddress(boolean)}
{@link ChannelOption#SO_RCVBUF}{@link #setReceiveBufferSize(int)}
{@link ChannelOption#SO_SNDBUF}{@link #setSendBufferSize(int)}
{@link ChannelOption#IP_MULTICAST_TTL}{@link #setTimeToLive(int)}
{@link ChannelOption#IP_TOS}{@link #setTrafficClass(int)}
*/ public interface DatagramChannelConfig extends ChannelConfig { /** * Gets the {@link StandardSocketOptions#SO_SNDBUF} option. */ int getSendBufferSize(); /** * Sets the {@link StandardSocketOptions#SO_SNDBUF} option. */ DatagramChannelConfig setSendBufferSize(int sendBufferSize); /** * Gets the {@link StandardSocketOptions#SO_RCVBUF} option. */ int getReceiveBufferSize(); /** * Sets the {@link StandardSocketOptions#SO_RCVBUF} option. */ DatagramChannelConfig setReceiveBufferSize(int receiveBufferSize); /** * Gets the {@link StandardSocketOptions#IP_TOS} option. */ int getTrafficClass(); /** * Sets the {@link StandardSocketOptions#IP_TOS} option. */ DatagramChannelConfig setTrafficClass(int trafficClass); /** * Gets the {@link StandardSocketOptions#SO_REUSEADDR} option. */ boolean isReuseAddress(); /** * Gets the {@link StandardSocketOptions#SO_REUSEADDR} option. */ DatagramChannelConfig setReuseAddress(boolean reuseAddress); /** * Gets the {@link StandardSocketOptions#SO_BROADCAST} option. */ boolean isBroadcast(); /** * Sets the {@link StandardSocketOptions#SO_BROADCAST} option. */ DatagramChannelConfig setBroadcast(boolean broadcast); /** * Gets the {@link StandardSocketOptions#IP_MULTICAST_LOOP} option. * * @return {@code true} if and only if the loopback mode has been disabled */ boolean isLoopbackModeDisabled(); /** * Sets the {@link StandardSocketOptions#IP_MULTICAST_LOOP} option. * * @param loopbackModeDisabled * {@code true} if and only if the loopback mode has been disabled */ DatagramChannelConfig setLoopbackModeDisabled(boolean loopbackModeDisabled); /** * Gets the {@link StandardSocketOptions#IP_MULTICAST_TTL} option. */ int getTimeToLive(); /** * Sets the {@link StandardSocketOptions#IP_MULTICAST_TTL} option. */ DatagramChannelConfig setTimeToLive(int ttl); /** * Gets the address of the network interface used for multicast packets. */ InetAddress getInterface(); /** * Sets the address of the network interface used for multicast packets. */ DatagramChannelConfig setInterface(InetAddress interfaceAddress); /** * Gets the {@link StandardSocketOptions#IP_MULTICAST_IF} option. */ NetworkInterface getNetworkInterface(); /** * Sets the {@link StandardSocketOptions#IP_MULTICAST_IF} option. */ DatagramChannelConfig setNetworkInterface(NetworkInterface networkInterface); @Override @Deprecated DatagramChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead); @Override DatagramChannelConfig setWriteSpinCount(int writeSpinCount); @Override DatagramChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis); @Override DatagramChannelConfig setAllocator(ByteBufAllocator allocator); @Override DatagramChannelConfig setRecvByteBufAllocator(RecvByteBufAllocator allocator); @Override DatagramChannelConfig setAutoRead(boolean autoRead); @Override DatagramChannelConfig setAutoClose(boolean autoClose); @Override DatagramChannelConfig setMessageSizeEstimator(MessageSizeEstimator estimator); @Override DatagramChannelConfig setWriteBufferWaterMark(WriteBufferWaterMark writeBufferWaterMark); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy