Tabnine Logo
ChannelException.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.jboss.netty.channel.ChannelException
constructor

Best Java code snippets using org.jboss.netty.channel.ChannelException.<init> (Showing top 20 results out of 315)

origin: io.netty/netty

  private void rethrow() {
    if (cause instanceof RuntimeException) {
      throw (RuntimeException) cause;
    }

    if (cause instanceof Error) {
      throw (Error) cause;
    }

    throw new ChannelException(cause);
  }
}
origin: io.netty/netty

public void setReceiveBufferSize(int receiveBufferSize) {
  try {
    socket.setReceiveBufferSize(receiveBufferSize);
  } catch (SocketException e) {
    throw new ChannelException(e);
  }
}
origin: io.netty/netty

public void setSendBufferSize(int sendBufferSize) {
  try {
    socket.setSendBufferSize(sendBufferSize);
  } catch (SocketException e) {
    throw new ChannelException(e);
  }
}
origin: io.netty/netty

public NetworkInterface getNetworkInterface() {
  if (socket instanceof MulticastSocket) {
    try {
      return ((MulticastSocket) socket).getNetworkInterface();
    } catch (SocketException e) {
      throw new ChannelException(e);
    }
  } else {
    throw new UnsupportedOperationException();
  }
}
origin: io.netty/netty

public boolean isReuseAddress() {
  try {
    return socket.getReuseAddress();
  } catch (SocketException e) {
    throw new ChannelException(e);
  }
}
origin: io.netty/netty

public void setReceiveBufferSize(int receiveBufferSize) {
  try {
    socket.setReceiveBufferSize(receiveBufferSize);
  } catch (SocketException e) {
    throw new ChannelException(e);
  }
}
origin: io.netty/netty

public void setTimeToLive(int ttl) {
  if (socket instanceof MulticastSocket) {
    try {
      ((MulticastSocket) socket).setTimeToLive(ttl);
    } catch (IOException e) {
      throw new ChannelException(e);
    }
  } else {
    throw new UnsupportedOperationException();
  }
}
origin: io.netty/netty

public boolean isKeepAlive() {
  try {
    return socket.getKeepAlive();
  } catch (SocketException e) {
    throw new ChannelException(e);
  }
}
origin: io.netty/netty

  public void setTrafficClass(int trafficClass) {
    try {
      socket.setTrafficClass(trafficClass);
    } catch (SocketException e) {
      throw new ChannelException(e);
    }
  }
}
origin: io.netty/netty

public void setTrafficClass(int trafficClass) {
  try {
    socket.setTrafficClass(trafficClass);
  } catch (SocketException e) {
    throw new ChannelException(e);
  }
}
origin: io.netty/netty

public int getSoLinger() {
  try {
    return socket.getSoLinger();
  } catch (SocketException e) {
    throw new ChannelException(e);
  }
}
origin: io.netty/netty

public void setReceiveBufferSize(int receiveBufferSize) {
  try {
    socket.setReceiveBufferSize(receiveBufferSize);
  } catch (SocketException e) {
    throw new ChannelException(e);
  }
}
origin: io.netty/netty

public void setInterface(InetAddress interfaceAddress) {
  if (socket instanceof MulticastSocket) {
    try {
      ((MulticastSocket) socket).setInterface(interfaceAddress);
    } catch (SocketException e) {
      throw new ChannelException(e);
    }
  } else {
    throw new UnsupportedOperationException();
  }
}
origin: io.netty/netty

public void setSendBufferSize(int sendBufferSize) {
  try {
    socket.setSendBufferSize(sendBufferSize);
  } catch (SocketException e) {
    throw new ChannelException(e);
  }
}
origin: io.netty/netty

public int getTrafficClass() {
  try {
    return socket.getTrafficClass();
  } catch (SocketException e) {
    throw new ChannelException(e);
  }
}
origin: io.netty/netty

@Override
public NetworkInterface getNetworkInterface() {
  if (DetectionUtil.javaVersion() < 7) {
    throw new UnsupportedOperationException();
  } else {
    try {
      return channel.getOption(StandardSocketOptions.IP_MULTICAST_IF);
    } catch (IOException e) {
      throw new ChannelException(e);
    }
  }
}
origin: io.netty/netty

@Override
public boolean isLoopbackModeDisabled() {
  if (DetectionUtil.javaVersion() < 7) {
    throw new UnsupportedOperationException();
  } else {
    try {
      return channel.getOption(StandardSocketOptions.IP_MULTICAST_LOOP);
    } catch (IOException e) {
      throw new ChannelException(e);
    }
  }
}
origin: apache/incubator-druid

@Override
public void channelDisconnected(ChannelHandlerContext context, ChannelStateEvent event)
{
 if (log.isDebugEnabled()) {
  log.debug("[%s] Channel disconnected", requestDesc);
 }
 // response is non-null if we received initial chunk and then exception occurs
 if (response != null) {
  handler.exceptionCaught(response, new ChannelException("Channel disconnected"));
 }
 channel.close();
 channelResourceContainer.returnResource();
 if (!retVal.isDone()) {
  log.warn("[%s] Channel disconnected before response complete", requestDesc);
  retVal.setException(new ChannelException("Channel disconnected"));
 }
}
origin: apache/incubator-druid

 @Override
 public void operationComplete(ChannelFuture future)
 {
  if (!future.isSuccess()) {
   channel.close();
   channelResourceContainer.returnResource();
   if (!retVal.isDone()) {
    retVal.setException(
      new ChannelException(
        StringUtils.format("[%s] Failed to write request to channel", requestDesc),
        future.getCause()
      )
    );
   }
  }
 }
}
origin: apache/incubator-druid

 @Override
 public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e)
 {
  final Channel channel = ctx.getChannel();
  if (channel == null) {
   // For the case where this pipeline is not attached yet.
   handshakeFuture.setFailure(new ChannelException(
     StringUtils.format("Channel is null. The context name is [%s]", ctx.getName())
   ));
   return;
  }
  handshakeFuture.setFailure(e.getCause());
  if (channel.isOpen()) {
   channel.close();
  }
 }
});
org.jboss.netty.channelChannelException<init>

Javadoc

Creates a new exception.

Popular methods of ChannelException

  • getMessage
  • addSuppressed
  • getCause
  • initCause

Popular in Java

  • Start an intent from android
  • onRequestPermissionsResult (Fragment)
  • getExternalFilesDir (Context)
  • findViewById (Activity)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • IsNull (org.hamcrest.core)
    Is the value null?
  • 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