Package org.exolab.jms.net.uri

Examples of org.exolab.jms.net.uri.URI


     */
    private HTTPRequestInfo populate(String uri, String host, int port,
                                     String user, String password,
                                     SSLProperties ssl)
            throws Exception {
        HTTPRequestInfo info = new HTTPRequestInfo(new URI(uri));
        info.setProxyHost(host);
        info.setProxyPort(port);
        info.setProxyUser(user);
        info.setProxyPassword(password);
        info.setSSLProperties(ssl);
View Full Code Here


                _accepted.remove(connection);
            } else {
                _connections.remove(connection);
                _handles.remove(connection);
            }
            URI remoteURI = null;
            URI localURI = null;
            try {
                remoteURI = connection.getRemoteURI();
                localURI = connection.getLocalURI();
            } catch (ResourceException exception) {
                _log.debug("Failed to get connection URIs", exception);
View Full Code Here

            throws ResourceException {
        ManagedConnection result = null;

        if (info instanceof SocketRequestInfo) {
            SocketRequestInfo requestInfo = (SocketRequestInfo) info;
            URI uri = URIHelper.convertHostToAddress(requestInfo.getURI());
            URI altURI = requestInfo.getAlternativeURI();
            if (altURI != null) {
                altURI = URIHelper.convertHostToAddress(altURI);
            }

            Iterator iterator = connections.iterator();
            while (iterator.hasNext()) {
                SocketManagedConnection connection =
                        (SocketManagedConnection) iterator.next();
                if (connection.hasPrincipal(principal)) {
                    final URI remote = connection.getRemoteURI();
                    final URI local = connection.getLocalURI();
                    final URI remoteAlt = connection.getAlternativeURI();
                    if ((remote.equals(uri) || local.equals(uri)
                         || remote.equals(altURI) || local.equals(altURI))
                        || (remoteAlt != null && (remoteAlt.equals(uri)
                                              || remoteAlt.equals(altURI)))) {
                        result = connection;
                        break;
                    }
                }
            }
View Full Code Here

     * @return connection request info for creating a managed connection
     * @throws Exception for any error
     */
    protected ConnectionRequestInfo getManagedConnectionRequestInfo()
        throws Exception {
        return new SocketRequestInfo(new URI("tcp://localhost:5081"));
    }
View Full Code Here

     * acceptor
     * @throws Exception for any error
     */
    protected ConnectionRequestInfo getAcceptorConnectionRequestInfo()
        throws Exception {
        return new SocketRequestInfo(new URI("tcp://localhost:5081"));
    }
View Full Code Here

        Properties properties = new Properties(prefix);
        SocketRequestInfo info1 = populate(uri, alternativeHost, bindAll);
        info1.export(properties);

        SocketRequestInfo info2 = new SocketRequestInfo(
                new URI(properties.get(ORB.PROVIDER_URI)),
                properties);
        assertEquals(info1, info2);

        assertEquals(uri, info2.getURI().toString());
        assertEquals(alternativeHost, info2.getAlternativeHost());
View Full Code Here

     * @throws Exception for any error
     */
    private SocketRequestInfo populate(String uri, String alternativeHost,
                                       boolean bindAll)
            throws Exception {
        SocketRequestInfo info = new SocketRequestInfo(new URI(uri));
        info.setAlternativeHost(alternativeHost);
        info.setBindAll(bindAll);
        return info;
    }
View Full Code Here

        TCPSRequestInfo info1 = populate(uri, alternativeHost, bindAll,
                                         ssl, clientAuthReqd);
        info1.export(properties);

        TCPSRequestInfo info2 = new TCPSRequestInfo(
                new URI(properties.get(ORB.PROVIDER_URI)),
                properties);

        assertEquals(info1, info2);

        assertEquals(ssl, info2.getSSLProperties());
View Full Code Here

     */
    private TCPSRequestInfo populate(String uri, String alternativeHost,
                                     boolean bindAll, SSLProperties ssl,
                                     boolean needClientAuth)
            throws Exception {
        TCPSRequestInfo info = new TCPSRequestInfo(new URI(uri));
        info.setAlternativeHost(alternativeHost);
        info.setBindAll(bindAll);
        info.setSSLProperties(ssl);
        info.setNeedClientAuth(needClientAuth);
        return info;
View Full Code Here

     * Populates the supplied properties with connection accept properties.
     *
     * @param properties the properties to populate
     */
    protected void populateAcceptProperties(Properties properties) {
        URI uri = getURI(getExportURI());
        try {
            SocketRequestInfo info = new SocketRequestInfo(uri);
            info.setBindAll(_config.getBindAll());
            info.export(properties);
        } catch (ResourceException exception) {
View Full Code Here

TOP

Related Classes of org.exolab.jms.net.uri.URI

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.