Package org.osgi.service.coordinator

Examples of org.osgi.service.coordinator.Coordination.fail()


                coordination.end();
        } catch (ResolveCancelledException e) {
            result = new ResolutionResult(Outcome.Cancelled, null, null, status, logger.getLog());

            if (coordination != null)
                coordination.fail(e);
        } catch (ResolutionException e) {
            status.add(new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, e.getLocalizedMessage(), e));
            result = new ResolutionResult(Outcome.Unresolved, null, null, status, logger.getLog());

            if (coordination != null)
View Full Code Here


        } catch (ResolutionException e) {
            status.add(new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, e.getLocalizedMessage(), e));
            result = new ResolutionResult(Outcome.Unresolved, null, null, status, logger.getLog());

            if (coordination != null)
                coordination.fail(e);
        } catch (Exception e) {
            status.add(new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, "Exception during resolution.", e));
            result = new ResolutionResult(Outcome.Error, null, null, status, logger.getLog());

            if (coordination != null)
View Full Code Here

        } catch (Exception e) {
            status.add(new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, "Exception during resolution.", e));
            result = new ResolutionResult(Outcome.Error, null, null, status, logger.getLog());

            if (coordination != null)
                coordination.fail(e);
        } finally {
            if (coordinator != null)
                bc.ungetService(coordSvcRef);
        }
    }
View Full Code Here

                coordination.end();
        } catch (ResolveCancelledException e) {
            result = new ResolutionResult(Outcome.Cancelled, null, null, status, logger.getLog());

            if (coordination != null)
                coordination.fail(e);
        } catch (ResolutionException e) {
            status.add(new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, e.getLocalizedMessage(), e));
            result = new ResolutionResult(Outcome.Unresolved, null, e, status, logger.getLog());

            if (coordination != null)
View Full Code Here

        } catch (ResolutionException e) {
            status.add(new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, e.getLocalizedMessage(), e));
            result = new ResolutionResult(Outcome.Unresolved, null, e, status, logger.getLog());

            if (coordination != null)
                coordination.fail(e);
        } catch (Exception e) {
            status.add(new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, "Exception during resolution.", e));
            result = new ResolutionResult(Outcome.Error, null, null, status, logger.getLog());

            if (coordination != null)
View Full Code Here

        } catch (Exception e) {
            status.add(new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, "Exception during resolution.", e));
            result = new ResolutionResult(Outcome.Error, null, null, status, logger.getLog());

            if (coordination != null)
                coordination.fail(e);
        } finally {
            if (coordinator != null)
                bc.ungetService(coordSvcRef);
        }
    }
View Full Code Here

        assertNull(c1.getFailure());
        assertFalse(c1.isTerminated());
        assertTrue(c1.getParticipants().isEmpty());

        Exception cause = new Exception();
        assertTrue(c1.fail(cause));
        assertSame(cause, c1.getFailure());
        assertTrue(c1.isTerminated());
        assertNull(coordinator.peek());

        assertFalse(c1.fail(new Exception()));
View Full Code Here

        assertTrue(c1.fail(cause));
        assertSame(cause, c1.getFailure());
        assertTrue(c1.isTerminated());
        assertNull(coordinator.peek());

        assertFalse(c1.fail(new Exception()));
        try
        {
            c1.end();
            fail("Expected CoordinationException.FAILED on end() after fail()");
        }
View Full Code Here

        c2.end();
        assertNull(c2.getFailure());
        assertTrue(c2.isTerminated());
        assertNull(coordinator.peek());

        assertFalse(c2.fail(new Exception()));
        try
        {
            c2.end();
            fail("Expected CoordinationException.ALREADY_ENDED on second end()");
        }
View Full Code Here

        final Coordination c2 = coordinator.begin(name, 0);
        assertNotNull(c2);
        assertEquals(name, c2.getName());
        assertEquals(c2, coordinator.peek());
        c2.fail(new Exception());
        assertNotNull(coordinator.peek());
        try {
            c2.end();
            fail("Exception should be thrown");
        } catch (CoordinationException ce) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.