GUI -- FIxed the maven archetype temporarily.
Change-Id: I4927182839f3685b26905e79c743b7a206aaa2c1
Showing
1 changed file
with
15 additions
and
5 deletions
tools/package/archetypes/ui/src/main/resources/archetype-resources/src/main/java/AppUiComponent.java
| ... | @@ -27,6 +27,7 @@ import org.apache.felix.scr.annotations.Deactivate; | ... | @@ -27,6 +27,7 @@ import org.apache.felix.scr.annotations.Deactivate; |
| 27 | import org.apache.felix.scr.annotations.Service; | 27 | import org.apache.felix.scr.annotations.Service; |
| 28 | import org.apache.felix.scr.annotations.Reference; | 28 | import org.apache.felix.scr.annotations.Reference; |
| 29 | import org.apache.felix.scr.annotations.ReferenceCardinality; | 29 | import org.apache.felix.scr.annotations.ReferenceCardinality; |
| 30 | +import org.onosproject.ui.RequestHandler; | ||
| 30 | import org.onosproject.ui.UiExtension; | 31 | import org.onosproject.ui.UiExtension; |
| 31 | import org.onosproject.ui.UiExtensionService; | 32 | import org.onosproject.ui.UiExtensionService; |
| 32 | import org.onosproject.ui.UiMessageHandler; | 33 | import org.onosproject.ui.UiMessageHandler; |
| ... | @@ -35,6 +36,7 @@ import org.onosproject.ui.UiView; | ... | @@ -35,6 +36,7 @@ import org.onosproject.ui.UiView; |
| 35 | import org.slf4j.Logger; | 36 | import org.slf4j.Logger; |
| 36 | import org.slf4j.LoggerFactory; | 37 | import org.slf4j.LoggerFactory; |
| 37 | 38 | ||
| 39 | +import java.util.Collection; | ||
| 38 | import java.util.List; | 40 | import java.util.List; |
| 39 | 41 | ||
| 40 | /** | 42 | /** |
| ... | @@ -77,13 +79,21 @@ public class AppUiComponent { | ... | @@ -77,13 +79,21 @@ public class AppUiComponent { |
| 77 | 79 | ||
| 78 | // Application UI message handler | 80 | // Application UI message handler |
| 79 | private class AppUiMessageHandler extends UiMessageHandler { | 81 | private class AppUiMessageHandler extends UiMessageHandler { |
| 80 | - protected AppUiMessageHandler() { | ||
| 81 | - super(ImmutableSet.of("sampleRequest")); | ||
| 82 | - } | ||
| 83 | 82 | ||
| 84 | @Override | 83 | @Override |
| 85 | - public void process(ObjectNode objectNode) { | 84 | + protected Collection<RequestHandler> getHandlers() { |
| 86 | - log.info("We got a message: {}", objectNode); | 85 | + return ImmutableSet.of(new SampleRequest()); |
| 86 | + } | ||
| 87 | + | ||
| 88 | + private class SampleRequest extends RequestHandler { | ||
| 89 | + public SampleRequest() { | ||
| 90 | + super("sampleRequest"); | ||
| 91 | + } | ||
| 92 | + | ||
| 93 | + @Override | ||
| 94 | + public void process(long sid, ObjectNode objectNode) { | ||
| 95 | + log.info("We got a message: {}", objectNode); | ||
| 96 | + } | ||
| 87 | } | 97 | } |
| 88 | } | 98 | } |
| 89 | 99 | ... | ... |
-
Please register or login to post a comment