Package org.mule.api.retry

Examples of org.mule.api.retry.RetryCallback


        }
    }

    private void scheduleForProcessing(final EventStoreKey eventStoreKey) throws Exception
    {
        RetryCallback callback = new RetryCallback()
        {
            @Override
            public String getWorkDescription()
            {
                return "Until successful processing of event stored under key: " + eventStoreKey;
View Full Code Here


        when(retryPolicyTemplate.execute(any(RetryCallback.class), any(WorkManager.class))).thenAnswer(
            new Answer<Object>()
            {
                public Object answer(InvocationOnMock invocation) throws Throwable
                {
                    RetryCallback retryCallback = (RetryCallback) invocation.getArguments()[0];
                    retryCallback.doWork(null);
                    return null;
                }
            });

        return endpoint;
View Full Code Here

        if (isConnected())
        {
            return;
        }

        RetryCallback callback = new RetryCallback()
        {
            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)
View Full Code Here

        {
            if (connector.isStarted() && !disposing.get())
            {
                try
                {
                    retryTemplate.execute(new RetryCallback()
                    {
                        public void doWork(RetryContext context) throws Exception
                        {
                            Socket socket = null;
                            try
View Full Code Here

        when(retryPolicyTemplate.execute(any(RetryCallback.class), any(WorkManager.class))).thenAnswer(
            new Answer<Object>()
            {
                public Object answer(InvocationOnMock invocation) throws Throwable
                {
                    RetryCallback retryCallback = (RetryCallback) invocation.getArguments()[0];
                    retryCallback.doWork(null);
                    return null;
                }
            });

        return endpoint;
View Full Code Here

        when(retryPolicyTemplate.execute(retryCallbackArgumentCaptor.capture(), Matchers.<WorkManager>any())).then(new Answer<Object>()
        {
            public Object answer(InvocationOnMock invocationOnMock) throws Throwable
            {
                RetryCallback retryCallback = retryCallbackArgumentCaptor.getValue();
                retryCallback.doWork(null);
                return null;
            }
        });

        Connection expectedConnection = mock(Connection.class);
View Full Code Here

        if (isConnected())
        {
            return;
        }

        RetryCallback callback = new RetryCallback()
        {
            @Override
            public void doWork(RetryContext context) throws Exception
            {
                // Try validateConnection() rather than connect() which may be a less expensive operation while we're retrying.
View Full Code Here

            return;
        }
        reconnecting = true;

        reconnectWorkManager.startIfNotStarted();
        retryTemplate.execute(new RetryCallback()
        {
            @Override
            public void doWork(RetryContext context) throws Exception
            {
                try
View Full Code Here

        {
            if (connector.isStarted() && !disposing.get())
            {
                try
                {
                    retryTemplate.execute(new RetryCallback()
                    {
                        public void doWork(RetryContext context) throws Exception
                        {
                            Socket socket = null;
                            try
View Full Code Here

        {
            if (httpConnector.isStarted() && !disconnect.get())
            {
                try
                {
                    retryTemplate.execute(new RetryCallback()
                    {
                        public void doWork(RetryContext context) throws Exception
                        {
                            Socket socket = null;
                            try
View Full Code Here

TOP

Related Classes of org.mule.api.retry.RetryCallback

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.