Package org.exolab.jms.net.tcp

Examples of org.exolab.jms.net.tcp.TCPSRequestInfo


     * @return connection request info for creating a managed connection
     * @throws Exception for any error
     */
    protected ConnectionRequestInfo getManagedConnectionRequestInfo()
            throws Exception {
        TCPSRequestInfo info =
                new TCPSRequestInfo(new URI("tcps://localhost:5099"));
        SSLProperties properties =
                SSLUtil.getSSLProperties("test.keystore", "secret");
        info.setSSLProperties(properties);
        return info;
    }
View Full Code Here


     * @return socket request info for creating a managed connection
     * @throws Exception for any error
     */
    protected SocketRequestInfo getSocketRequestInfo(URI uri)
            throws Exception {
        TCPSRequestInfo info = new TCPSRequestInfo(uri);
        info.setSSLProperties(
                SSLUtil.getSSLProperties("test.keystore", "secret"));
        return info;
    }
View Full Code Here

        final String uri = "tcps://localhost:8050";
        final SSLProperties ssl = new SSLProperties();
        final boolean clientAuthReqd = true;
        final boolean clientAuthNotReqd = false;

        TCPSRequestInfo info = populate(uri, null, true, ssl, clientAuthReqd);

        assertEquals(ssl, info.getSSLProperties());
        assertEquals(clientAuthReqd, info.getNeedClientAuth());

        info.setNeedClientAuth(clientAuthNotReqd);
        assertEquals(clientAuthNotReqd, info.getNeedClientAuth());
    }
View Full Code Here

        final boolean bindAll = true;
        final SSLProperties ssl = new SSLProperties();
        final boolean clientAuthReqd = true;
        final boolean clientAuthNotReqd = false;

        TCPSRequestInfo info1 = populate(uri, alternativeURI, bindAll,
                                         ssl, clientAuthReqd);
        TCPSRequestInfo info2 = populate(uri, alternativeURI, bindAll,
                                         ssl, clientAuthReqd);
        assertEquals(info1, info2);

        TCPSRequestInfo info3 = populate(uri, alternativeURI, bindAll,
                                         null, clientAuthReqd);
        assertFalse(info1.equals(info3));

        TCPSRequestInfo info4 = populate(uri, alternativeURI, bindAll,
                                         ssl, clientAuthNotReqd);
        assertFalse(info1.equals(info4));
    }
View Full Code Here

        ssl.setTrustStore("trustStore");
        ssl.setTrustStorePassword("trustStorePassword");
        ssl.setTrustStoreType("PCKS12");

        Properties properties = new Properties(prefix);
        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());
        assertEquals(clientAuthReqd, info2.getNeedClientAuth());
    }
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

     *
     * @param properties the properties to populate
     */
    protected void populateAcceptProperties(Properties properties) {
        URI uri = getURI(getExportURI());
        TCPSRequestInfo info;
        try {
            info = new TCPSRequestInfo(uri);
        } catch (ResourceException exception) {
            // should never happen
            throw new IllegalStateException(exception.getMessage());
        }
        populateRequestInfo(info);

        TcpsConfiguration config = getConfiguration().getTcpsConfiguration();
        SSLProperties ssl = new SSLProperties();
        ssl.setKeyStore(config.getKeyStore());
        ssl.setKeyStorePassword(config.getKeyStorePassword());
        ssl.setKeyStoreType(config.getKeyStoreType());
        ssl.setTrustStore(config.getTrustStore());
        ssl.setTrustStorePassword(config.getTrustStorePassword());
        ssl.setTrustStoreType(config.getTrustStoreType());
        if (!ssl.isEmpty()) {
            info.setSSLProperties(ssl);
        }
        info.setNeedClientAuth(config.getNeedClientAuth());
        info.export(properties);
    }
View Full Code Here

TOP

Related Classes of org.exolab.jms.net.tcp.TCPSRequestInfo

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.