Package org.apache.qpid.transport

Examples of org.apache.qpid.transport.TransportException


          }
         
          if (hostname != null && !(hostname.equalsIgnoreCase(hostnameExpected) ||
                  hostname.equalsIgnoreCase(hostnameExpected + ".localdomain")))
          {
              throw new TransportException("SSL hostname verification failed." +
                                           " Expected : " + hostnameExpected +
                                           " Found in cert : " + hostname);
          }
         
        }
View Full Code Here


                if (block && Thread.currentThread() != receiverThread)
                {
                    receiverThread.join(timeout);
                    if (receiverThread.isAlive())
                    {
                        throw new TransportException("join timed out");
                    }
                }
            }
            catch (InterruptedException e)
            {
                throw new TransportException(e);
            }
            catch (IOException e)
            {
                throw new TransportException(e);
            }
        }
    }
View Full Code Here

                Socket sock = socket.accept();
                IoTransport<E> transport = new IoTransport<E>(sock, binding);
            }
            catch (IOException e)
            {
                throw new TransportException(e);
            }
        }
    }
View Full Code Here

            socket.connect(new InetSocketAddress(address, port));
            return socket;
        }
        catch (SocketException e)
        {
            throw new TransportException("Error connecting to broker", e);
        }
        catch (IOException e)
        {
            throw new TransportException("Error connecting to broker", e);
        }
    }
View Full Code Here

                if (Thread.currentThread() != this)
                {
                    join(timeout);
                    if (isAlive())
                    {
                        throw new TransportException("join timed out");
                    }
                }
            }
            catch (InterruptedException e)
            {
                throw new TransportException(e);
            }
            catch (IOException e)
            {
                throw new TransportException(e);
            }
        }
    }
View Full Code Here

                Socket sock = socket.accept();
                IoTransport<E> transport = new IoTransport<E>(sock, binding);
            }
            catch (IOException e)
            {
                throw new TransportException(e);
            }
        }
    }
View Full Code Here

        {
            out = socket.getOutputStream();
        }
        catch (IOException e)
        {
            throw new TransportException("Error getting output stream for socket", e);
        }

        setDaemon(true);
        setName(String.format("IoSender - %s", socket.getRemoteSocketAddress()));
        start();
View Full Code Here

    public void send(ByteBuffer buf)
    {
        if (closed.get())
        {
            throw new TransportException("sender is closed", exception);
        }

        final int size = buffer.length;
        int remaining = buf.remaining();

        while (remaining > 0)
        {
            final int hd = head;
            final int tl = tail;

            if (hd - tl >= size)
            {
                flush();
                synchronized (notFull)
                {
                    long start = System.currentTimeMillis();
                    long elapsed = 0;
                    while (!closed.get() && head - tail >= size && elapsed < timeout)
                    {
                        try
                        {
                            notFull.wait(timeout - elapsed);
                        }
                        catch (InterruptedException e)
                        {
                            // pass
                        }
                        elapsed += System.currentTimeMillis() - start;
                    }

                    if (closed.get())
                    {
                        throw new TransportException("sender is closed", exception);
                    }

                    if (head - tail >= size)
                    {
                        throw new TransportException(String.format("write timed out: %s, %s", head, tail));
                    }
                }
                continue;
            }
View Full Code Here

                if (Thread.currentThread() != this)
                {
                    join(timeout);
                    if (isAlive())
                    {
                        throw new TransportException("join timed out");
                    }
                }
                transport.getReceiver().close();
                socket.close();
            }
            catch (InterruptedException e)
            {
                throw new TransportException(e);
            }
            catch (IOException e)
            {
                throw new TransportException(e);
            }

            if (reportException && exception != null)
            {
                throw new TransportException(exception);
            }
        }
    }
View Full Code Here

                if (block && Thread.currentThread() != receiverThread)
                {
                    receiverThread.join(timeout);
                    if (receiverThread.isAlive())
                    {
                        throw new TransportException("join timed out");
                    }
                }
            }
            catch (InterruptedException e)
            {
                throw new TransportException(e);
            }
            catch (IOException e)
            {
                throw new TransportException(e);
            }

        }
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.transport.TransportException

Copyright © 2018 www.massapicom. 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.