Examples of TargetGroupBriefing


Examples of org.netmelody.cieye.server.TargetGroupBriefing

                                                                                              spyIntermediary,
                                                                                              new Prison());
   
    @Test public void
    respondsWithCorrectJsonWhenNoTargetsArePresent() throws IOException {
        final TargetGroupBriefing briefing = new TargetGroupBriefing(new TargetDetailGroup(), 0L);
       
        context.checking(new Expectations() {{
            allowing(spyIntermediary).briefingOn(feature); will(returnValue(briefing));
        }});
       
View Full Code Here

Examples of org.netmelody.cieye.server.TargetGroupBriefing

    }

    @Override
    public TargetGroupBriefing briefingOn(Feature feature) {
        PollingSpyHandler spy = spyFor(feature);
        return new TargetGroupBriefing(spy.statusOf(feature), spy.millisecondsUntilNextUpdate(feature));
    }
View Full Code Here

Examples of org.netmelody.cieye.server.TargetGroupBriefing

    @Override
    public CiEyeResponse respond(Request request) throws IOException {
        LandscapeObservation result = new LandscapeObservation();
        long timeToLiveMillis = Long.MAX_VALUE;
        for (Feature feature : landscape.features()) {
            final TargetGroupBriefing briefing = spyIntermediary.briefingOn(feature);
            result = result.add(briefing.status);
            timeToLiveMillis = min(timeToLiveMillis, briefing.millisecondsUntilNextUpdate);
        }
       
        if (prison.crimeReported(landscape)) {
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.