MCPcopy Create free account
hub / github.com/akeranen/the-one / getApplications

Method getApplications

routing/MessageRouter.java:625–640  ·  view source on GitHub ↗

Returns all the applications that want to receive messages for the given application ID. @param ID The application ID or null for all apps. @return A list of all applications that want to receive the message.

(String ID)

Source from the content-addressed store, hash-verified

623 * @return A list of all applications that want to receive the message.
624 */
625 public Collection<Application> getApplications(String ID) {
626 LinkedList<Application> apps = new LinkedList<Application>();
627 // Applications that match
628 Collection<Application> tmp = this.applications.get(ID);
629 if (tmp != null) {
630 apps.addAll(tmp);
631 }
632 // Applications that want to look at all messages
633 if (ID != null) {
634 tmp = this.applications.get(null);
635 if (tmp != null) {
636 apps.addAll(tmp);
637 }
638 }
639 return apps;
640 }
641
642 /**
643 * Creates a replicate of this router. The replicate has the same

Callers 1

messageTransferredMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected