Search in sources :

Example 1 with TopicId

use of org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventaggregator.rev141202.TopicId in project controller by opendaylight.

the class EventSourceTopic method getDisJoinTopicInputArgument.

private DisJoinTopicInput getDisJoinTopicInputArgument(final InstanceIdentifier<?> eventSourceNodeId) {
    final NodeRef nodeRef = new NodeRef(eventSourceNodeId);
    final DisJoinTopicInput dji = new DisJoinTopicInputBuilder().setNode(nodeRef.getValue()).setTopicId(topicId).build();
    return dji;
}
Also used : NodeRef(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef) DisJoinTopicInput(org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventsource.rev141202.DisJoinTopicInput) DisJoinTopicInputBuilder(org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventsource.rev141202.DisJoinTopicInputBuilder)

Example 2 with TopicId

use of org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventaggregator.rev141202.TopicId in project controller by opendaylight.

the class EventSourceTopologyTest method closeTest.

@Test
public void closeTest() throws Exception {
    constructorTestHelper();
    topicTestHelper();
    Map<TopicId, EventSourceTopic> localMap = getEventSourceTopicMap();
    TopicId topicIdMock = mock(TopicId.class);
    EventSourceTopic eventSourceTopic = EventSourceTopic.create(new NotificationPattern("foo"), "pattern", eventSourceTopology);
    localMap.put(topicIdMock, eventSourceTopic);
    eventSourceTopology.close();
    verify(aggregatorRpcReg, times(1)).close();
    verify(listenerRegistrationMock, times(1)).close();
}
Also used : NotificationPattern(org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventaggregator.rev141202.NotificationPattern) TopicId(org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventaggregator.rev141202.TopicId) Test(org.junit.Test)

Example 3 with TopicId

use of org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventaggregator.rev141202.TopicId in project controller by opendaylight.

the class EventSourceTopologyTest method destroyTopicTest.

@Test
public void destroyTopicTest() throws Exception {
    topicTestHelper();
    TopicId topicId = new TopicId("topic-id-007");
    Map<TopicId, EventSourceTopic> localMap = getEventSourceTopicMap();
    EventSourceTopic eventSourceTopic = EventSourceTopic.create(new NotificationPattern("foo"), "pattern", eventSourceTopology);
    localMap.put(topicId, eventSourceTopic);
    DestroyTopicInput input = new DestroyTopicInputBuilder().setTopicId(topicId).build();
    eventSourceTopology.destroyTopic(input);
    verify(listenerRegistrationMock, times(1)).close();
}
Also used : NotificationPattern(org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventaggregator.rev141202.NotificationPattern) DestroyTopicInput(org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventaggregator.rev141202.DestroyTopicInput) TopicId(org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventaggregator.rev141202.TopicId) DestroyTopicInputBuilder(org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventaggregator.rev141202.DestroyTopicInputBuilder) Test(org.junit.Test)

Example 4 with TopicId

use of org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventaggregator.rev141202.TopicId in project controller by opendaylight.

the class EventSourceTopic method getJoinTopicInputArgument.

private JoinTopicInput getJoinTopicInputArgument(final InstanceIdentifier<?> path) {
    final NodeRef nodeRef = new NodeRef(path);
    final JoinTopicInput jti = new JoinTopicInputBuilder().setNode(nodeRef.getValue()).setTopicId(topicId).setNotificationPattern(notificationPattern).build();
    return jti;
}
Also used : NodeRef(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef) DisJoinTopicInput(org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventsource.rev141202.DisJoinTopicInput) JoinTopicInput(org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventsource.rev141202.JoinTopicInput) DisJoinTopicInputBuilder(org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventsource.rev141202.DisJoinTopicInputBuilder) JoinTopicInputBuilder(org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventsource.rev141202.JoinTopicInputBuilder)

Aggregations

Test (org.junit.Test)2 NotificationPattern (org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventaggregator.rev141202.NotificationPattern)2 TopicId (org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventaggregator.rev141202.TopicId)2 DisJoinTopicInput (org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventsource.rev141202.DisJoinTopicInput)2 DisJoinTopicInputBuilder (org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventsource.rev141202.DisJoinTopicInputBuilder)2 NodeRef (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef)2 DestroyTopicInput (org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventaggregator.rev141202.DestroyTopicInput)1 DestroyTopicInputBuilder (org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventaggregator.rev141202.DestroyTopicInputBuilder)1 JoinTopicInput (org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventsource.rev141202.JoinTopicInput)1 JoinTopicInputBuilder (org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventsource.rev141202.JoinTopicInputBuilder)1