Examples of PacketTransportException


Examples of net.timewalker.ffmq3.transport.PacketTransportException

       
        return socket;
      }
      catch (SocketException e)
      {
        throw new PacketTransportException("Could not set socket options",e);
      }
    }
View Full Code Here

Examples of net.timewalker.ffmq3.transport.PacketTransportException

      this.selectorThread = new SelectorThread(client);
      this.selectorThread.start();
    }
    catch (Exception e)
    {
      throw new PacketTransportException("Cannot create NIO multiplexer",e);
    }
  }
View Full Code Here

Examples of net.timewalker.ffmq3.transport.PacketTransportException

        if (responseSize == -1)
            return null;
       
        // Security check
        if (responseSize > maxPacketSize)
            throw new PacketTransportException("Packet is too large : "+responseSize+" (maxPacketSize="+maxPacketSize+"), dropping client.");
       
        if (!receiveData(inChannel.ioBuffer, inChannel.stream, responseSize))
            return null;
       
        // Unserialize response
View Full Code Here

Examples of net.timewalker.ffmq3.transport.PacketTransportException

            }
            return true;
        }
        catch (IOException e)
        {
            throw new PacketTransportException("Connection read error",e);
        }
    }
View Full Code Here

Examples of net.timewalker.ffmq3.transport.PacketTransportException

            return socketChannel;
        }
        catch (Exception e)
        {
            log.error("#"+id+" could not connect to "+host+":"+port,e);
            throw new PacketTransportException("Could not connect to "+host+":"+port+" : "+e.toString());
        }
    }
View Full Code Here

Examples of net.timewalker.ffmq3.transport.PacketTransportException

   * @see net.timewalker.ffmq3.transport.PacketTransport#send(net.timewalker.ffmq3.transport.packet.AbstractPacket)
   */
  public void send(AbstractPacket packet) throws PacketTransportException
  {
    if (closed)
      throw new PacketTransportException("Transport is closed");
   
    lastSendActivity = System.currentTimeMillis();
   
    boolean wakeUpRequired;
    synchronized (sendQueue)
    {
      if (sendQueueMaxSize > 0 && sendQueue.size() >= sendQueueMaxSize)
        throw new PacketTransportException("Send queue overflow (size="+sendQueueMaxSize+")");
     
      wakeUpRequired = sendQueue.isEmpty();
      sendQueue.add(packet);
    }
   
View Full Code Here

Examples of net.timewalker.ffmq3.transport.PacketTransportException

    public void send(AbstractPacket packet) throws PacketTransportException
    {
      synchronized (sendQueue)
    {
        if (sendQueueMaxSize > 0 && sendQueue.size() >= sendQueueMaxSize)
        throw new PacketTransportException("Send queue overflow (size="+sendQueueMaxSize+")");
       
        sendQueue.addLast(packet);
    }
      waitLock.release();     
    }
View Full Code Here

Examples of net.timewalker.ffmq3.transport.PacketTransportException

    {
        synchronized (sendQueue)
        {
            int len = packets.size();
            if (sendQueueMaxSize > 0 && sendQueue.size() > sendQueueMaxSize+len)
                throw new PacketTransportException("Send queue overflow (size="+sendQueueMaxSize+")");
           
            for (int i = 0 ; i < len ; i++)
                sendQueue.addLast(packets.get(i));
        }
        waitLock.release();
View Full Code Here

Examples of net.timewalker.ffmq3.transport.PacketTransportException

            return socket;
        }
        catch (Exception e)
        {
            log.error("#"+id+" could not connect to "+host+":"+port+" (timeout="+connectTimeout+"s)",e);
            throw new PacketTransportException("Could not connect to "+host+":"+port+" : "+e.toString());
        }
    }
View Full Code Here

Examples of net.timewalker.ffmq3.transport.PacketTransportException

            receiverThread.waitForStartup();
        }
        catch (Exception e)
        {
            log.error("#"+id+" cannot start TCP packet I/O handlers",e);
            throw new PacketTransportException("Cannot start TCP packet I/O handlers : "+e.toString());
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.