Changeset 791


Ignore:
Timestamp:
05/12/11 19:15:21 (8 years ago)
Author:
philsmart
Message:
 
Location:
raptor-client/trunk/src/main/java/uk/ac/cardiff/raptor/registry
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • raptor-client/trunk/src/main/java/uk/ac/cardiff/raptor/registry/Endpoint.java

    r775 r791  
    5858        /** Information about what information has been released to this endpoint */ 
    5959        private ReleaseInformation releaseInformation; 
     60 
     61        /** Which event types can be sent to this endpoint */ 
     62        private Class<?>[] supportedEvents; 
    6063 
    6164 
     
    120123 
    121124 
     125    /** 
     126     * @param supportedEvents the supportedEvents to set 
     127     */ 
     128    public void setSupportedEvents(Class<?>[] supportedEvents) { 
     129        this.supportedEvents = supportedEvents; 
     130    } 
     131 
     132 
     133    /** 
     134     * @return the supportedEvents 
     135     */ 
     136    public Class<?>[] getSupportedEvents() { 
     137        return supportedEvents; 
     138    } 
     139 
     140 
    122141 
    123142} 
  • raptor-client/trunk/src/main/java/uk/ac/cardiff/raptor/registry/EventReleaseEngine.java

    r790 r791  
    6464                for (Endpoint endpoint : endpointRegistry.getEndpoints()) { 
    6565                        List<Event> applicableEvents = chronologicalFilter(endpoint, events); 
     66                        applicableEvents = eventTypeFilter(endpoint,applicableEvents); 
    6667                        boolean shouldRelease = shouldRelease(endpoint,applicableEvents); 
    6768                        log.debug("Endpoint {}, should release {}", endpoint.getServiceEndpoint(), shouldRelease); 
     
    9596 
    9697        /** 
     98     * Method that returns those events that are supported by the <code>endpoint</code parameter. 
     99     * 
     100     * @param endpoint 
     101     * @param applicableEvents 
     102     * @return 
     103     */ 
     104    private List<Event> eventTypeFilter(Endpoint endpoint, List<Event> applicableEvents) { 
     105        ArrayList<Event> applicableEvents = new ArrayList<Event>(); 
     106 
     107        return applicableEvents; 
     108    } 
     109 
     110 
     111 
     112    /** 
    97113         * Filters the input list of events (<code>events</code>) such that only those that are after (chronological) 
    98114         * the <code>latestPublishedEventTime</code> of the input <code>Endpoint</code> remain 
Note: See TracChangeset for help on using the changeset viewer.