Package org.mule.api.transport

Examples of org.mule.api.transport.Connectable


    /**
     * MULE-4531
     */
    public void testDoNotConnectIfConnected() throws Exception
    {
        Connectable connectable = new TestConnectable(getTestInboundEndpoint("test"), true);
        connectable.connect();
    }
View Full Code Here


            public void doWork(RetryContext context) throws Exception
            {
                // Try validateConnection() rather than connect() which may be a less expensive operation while we're retrying.
                if (validateConnections && context.getLastFailure() instanceof ConnectException)
                {
                    Connectable failed = ((ConnectException) context.getLastFailure()).getFailed();                   
                    if (!failed.validateConnection(context).isOk())
                    {
                        throw new ConnectException(
                                MessageFactory.createStaticMessage("Still unable to connect to resource " + failed.getClass().getName()),
                                context.getLastFailure(), failed);
                    }
                }
                doConnect();
View Full Code Here

            public void doWork(RetryContext context) throws Exception
            {
                // Try validateConnection() rather than connect() which may be a less expensive operation while we're retrying.
                if (validateConnections && context.getLastFailure() instanceof ConnectException)
                {
                    Connectable failed = ((ConnectException) context.getLastFailure()).getFailed();
                    if (!failed.validateConnection(context).isOk())
                    {
                        throw new ConnectException(
                                MessageFactory.createStaticMessage("Still unable to connect to resource " + failed.getClass().getName()),
                                context.getLastFailure(), failed);
                    }
                }
                doConnect();
View Full Code Here

     * MULE-4531
     */
    @Test
    public void testDoNotConnectIfConnected() throws Exception
    {
        Connectable connectable = new TestConnectable(getTestInboundEndpoint("test"), true);
        connectable.connect();
    }
View Full Code Here

        ConnectException e = new ConnectException(new Exception(message), connectable);
        e = SerializationTestUtils.testException(e, muleContext);

        assertTrue(e.getMessage().contains(message));
        Connectable failed = e.getFailed();
        assertNotNull("Connectable was not serialized", failed);
        assertTrue(failed instanceof TestSerializableConnectable);

        assertEquals(value, ((TestSerializableConnectable) failed).getValue());
    }
View Full Code Here

        ConnectException e = new ConnectException(new Exception(message),
            new TestNotSerializableConnectable());
        e = SerializationTestUtils.testException(e, muleContext);

        assertTrue(e.getMessage().contains(message));
        Connectable failed = e.getFailed();
        assertNull(failed);
    }
View Full Code Here

TOP

Related Classes of org.mule.api.transport.Connectable

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.