class InstanceResource {

    @GET
    @Path("/{instanceId}/slobrok")
    @Produces(MediaType.APPLICATION_JSON)
    public List<SlobrokEntryResponse> getSlobrokEntries(
            @PathParam("instanceId") String instanceId,
            @QueryParam("pattern") String pattern) {
        ApplicationInstanceReference reference = parseInstanceId(instanceId);
        ApplicationId applicationId = OrchestratorUtil.toApplicationId(reference);

        if (pattern == null) {
            pattern = DEFAULT_SLOBROK_PATTERN;
        }

        List<Mirror.Entry> entries = slobrokApi.lookup(applicationId, pattern);
        return entries.stream()
                .map(entry -> new SlobrokEntryResponse(entry.getName(), entry.getSpecString()))
                .collect(Collectors.toList());
    }

    @Inject public  InstanceResource(@Component ServiceMonitor serviceMonitor,
                            @Component StatusService statusService,
                            @Component SlobrokApi slobrokApi,
                            @Component UnionMonitorManager rootManager);

}