Package org.osgi.framework

Examples of org.osgi.framework.ServiceRegistration.unregister()


            assertEquals(0, jobManager.findJobs(JobManager.QueryType.ALL, TOPIC + "/failed", -1, (Map<String, Object>[])null).size());

            jobManager.removeJobById(id); // removes the job permanently
        } finally {
            jcReg.unregister();
            ehReg.unregister();
        }
    }

    private static final class DataObject implements Serializable {
        private static final long serialVersionUID = 1L;
View Full Code Here


            if ( col != null ) {
                for(final Job j : col) {
                    this.getJobManager().removeJobById(j.getId());
                }
            }
            reg.unregister();
        }
    }
}
View Full Code Here

            assertEquals("Finished count", NUM_JOBS + 1, q.getStatistics().getNumberOfFinishedJobs());
            assertEquals("Failed count", NUM_JOBS / 10, q.getStatistics().getNumberOfFailedJobs());
            assertEquals("Cancelled count", 0, q.getStatistics().getNumberOfCancelledJobs());
        } finally {
            jcReg.unregister();
            ehReg.unregister();
        }
    }
}
View Full Code Here

            assertEquals("Failed count", 0, q.getStatistics().getNumberOfFailedJobs());
            assertEquals("Cancelled count", 0, q.getStatistics().getNumberOfCancelledJobs());
        } finally {
            jc1Reg.unregister();
            jcReg.unregister();
            ehReg.unregister();
        }
    }
}
View Full Code Here

            // Session should timeout automatically...
            assertTrue(destroyedLatch.await(50, TimeUnit.SECONDS));
        }
        finally
        {
            reg.unregister();
        }
    }

    /**
     * Tests that {@link HttpSessionAttributeListener}s are called whenever a session attribute is added, changed or removed.
View Full Code Here

        {
            assertContent(SC_OK, null, new URL("http://localhost:8080/session"));
        }
        finally
        {
            reg.unregister();
        }
    }
}
View Full Code Here

        }
        finally
        {
            if (reg != null)
            {
                reg.unregister();
            }

            tracker.close();
        }
    }
View Full Code Here

            // unregister configuration printer too
            ServiceRegistration reg = printerRegistration;
            if (reg != null)
            {
                reg.unregister();
                printerRegistration = null;
            }
        }

    }
View Full Code Here

        assertEquals("file://test.txt", connFactory.getName());
        assertEquals(ConnectorService.WRITE, connFactory.getMode());
        assertEquals(false, connFactory.isTimeout());
        assertNotNull("checks returned OutputStream", outStream);

        registration.unregister();
    }

    /**
     * Registers two ConnectionFactory services with same IO_SCHEME. One with higher service.ranking Connector Service
     * should pickup service with highest service.ranking.
View Full Code Here

        Long serviceId2 = (Long) registration2.getReference().getProperty(Constants.SERVICE_ID);

        assertTrue(serviceId1.longValue() < serviceId2.longValue());

        registration.unregister();
        registration2.unregister();
    }

    /**
     * Tests ConnectionFactory service which support 3 different schemes.
     *
 
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.