Package org.apache.geronimo.remoting.transport

Examples of org.apache.geronimo.remoting.transport.TransportException


                inflator = new Inflater(true);
                deflater = new Deflater(compression, true);
            }
           
        } catch (Exception e) {
            throw new TransportException("Connection handshake failed: " + e);
        }

        worker = new Thread(this, "Channel -> " + remoteURI);
        worker.setDaemon(true);
        worker.start();
View Full Code Here


    public void send(AsyncMsg data) throws TransportException {
        try {
            ByteBuffer buffers[] = serialize(data);
            synchronized (sendMutex) {
                if (closing)
                    throw new TransportException("connection has been closed.");
                // should block.
                socketChannel.write(buffers);
            }
        } catch (IOException e) {
            throw new TransportException("" + e);
        }
    }
View Full Code Here

            msg.pushMarshaledObject((MarshalledObject) rc);
            return msg;

        } catch (Throwable e) {
            e.printStackTrace();
            throw new TransportException(e.getMessage());
        }
    }
View Full Code Here

            InvocationSupport.putMarshaledValue(invocation, msg.popMarshaledObject());
            InvocationSupport.putRemoteURI(invocation, to);

            interceptor.invoke(invocation);
        } catch (Throwable e) {
            throw new TransportException(e.getMessage());
        }
    }
View Full Code Here

    public Msg sendRequest(URI to, Msg msg) throws TransportException {
        try {
            routerLock.acquire();
            Router next = lookupRouterFrom(to);
            if (next == null) {
                throw new TransportException("No route is available to: " + to);
            }

            return next.sendRequest(to, msg);

        } catch (Throwable e) {
            e.printStackTrace();
            throw new TransportException(e.getMessage());
        }
    }
View Full Code Here

        try {
            routerLock.acquire();
            Router next = lookupRouterFrom(to);
            next.sendDatagram(to, msg);
        } catch (Throwable e) {
            throw new TransportException(e.getMessage());
        }
    }
View Full Code Here

                // We fall out of the loop once we aquire a permit to open a connection to the server. 
            } while (!maxOpenConnections.attempt(100));

        } catch (InterruptedException e1) {
            throw new TransportException("(" + remoteURI + "): " + e1);
        }

        // not available, make one on demand
        try {

            log.debug("channel connecting to: " + remoteURI);
            PooledAsynchChannel c = new PooledAsynchChannel(TransportFactory.instance.createAsynchChannel());
            c.open(remoteURI, backConnectURI);

            return c;
        } catch (Exception e) {
            // return the aquired permit.
            maxOpenConnections.release();
            log.debug("Connect Failed: ", e);
            if (log.isDebugEnabled()) {
                log.debug("channel connection to: " + remoteURI + " failed", e);
            }
            throw new TransportException("(" + remoteURI + "): " + e);
        }
    }
View Full Code Here

        try {
            Msg result = (AsyncMsg) requestId.poll(Registry.REQUEST_TIMEOUT);
            if (log.isTraceEnabled())
                log.trace("response data was corelated for request: " + requestId.getID());
            if (result == null)
                throw new TransportException("Request time out.");
            return result;
        } catch (InterruptedException e) {
            throw new TransportException(e.getMessage());
        }

    }
View Full Code Here

            selectorManager = SelectorManager.getInstance();
            selectorManager.start();
            selectionKey = selectorManager.register( socketChannel, SelectionKey.OP_READ, this);

        } catch (Exception e) {
            throw new TransportException("Connection handshake failed: " + e);
        }

    }
View Full Code Here

            selectorManager = SelectorManager.getInstance();
            selectorManager.start();
            selectionKey = selectorManager.register( socketChannel, SelectionKey.OP_READ, this);
           
        } catch (Exception e) {
            throw new TransportException("Connection handshake failed: " + e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.remoting.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.