/** * Determines whether or not the specified session is a UDP session. * * @param session The session to check. * @return <code>true</code> if the session is a UDP session, otherwise * <code>false</code>. */ public static boolean isUdp(final IoSession session) { return session.getTransportType().isConnectionless(); } }
private Object readResolve() throws ObjectStreamException { for (int i = names.length - 1; i >= 0; i--) { try { return getInstance(names[i]); } catch (IllegalArgumentException e) { // ignore } } throw new InvalidObjectException("Unknown transport type."); } }
register(names, this); this.names = names; this.connectionless = connectionless;
public void filterWrite(NextFilter nextFilter, IoSession session, WriteRequest writeRequest) throws Exception { if (session.getTransportType().getEnvelopeType().isAssignableFrom( writeRequest.getMessage().getClass())) { doWrite(session, writeRequest); } else { throw new IllegalStateException( "Write requests must be transformed to " + session.getTransportType().getEnvelopeType() + ": " + writeRequest); } }
final boolean isUdp = type.isConnectionless(); final IceCandidate remoteCandidate; if (!m_iceMediaStream.hasRemoteCandidate(remoteAddress, isUdp))