KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ubermq > jms > common > routing > IRouter


1 package com.ubermq.jms.common.routing;
2
3 import java.util.*;
4
5 /**
6  * A router provides a set of destination nodes given a source specification.
7  */

8 public interface IRouter
9 {
10     /**
11      * Gets destination nodes given an source descriptor, which is passed
12      * to source specification implementations.
13      *
14      * @param source a source descriptor to use.
15      * @return a Collection of RouteDestNode objects
16      */

17     public Collection getRoutes(SourceDescriptor source);
18
19     /**
20      * Returns a set of source specifications that are currently
21      * mapped to the specified destination node. <strong>IMPORTANT NOTE:</strong>
22      * This is considered a reverse
23      * lookup and may potentially be costly, depending on implementation.<P>
24      *
25      * @param dest the destination
26      * @return a Collection of SourceSpec objects
27      * @throws UnsupportedOperationException if the router does not
28      * choose to implement this reverse lookup function.
29      */

30     public Collection getRoutesTo(RouteDestNode dest);
31 }
32
Popular Tags