test_class.declarator: component
test_class.modifier: private
test_class.original_string: private BasicRosMessageRouterActivityComponent<String> component;
test_class.type: BasicRosMessageRouterActivityComponent<String>
test_class.var_name: component
test_class.declarator: messageListener
test_class.modifier: private
test_class.original_string: private RoutableInputMessageListener<String> messageListener;
test_class.type: RoutableInputMessageListener<String>
test_class.var_name: messageListener
test_class.declarator: activityComponentContext
test_class.modifier: private
test_class.original_string: private ActivityComponentContext activityComponentContext;
test_class.type: ActivityComponentContext
test_class.var_name: activityComponentContext
test_class.declarator: configuration
test_class.modifier: private
test_class.original_string: private Configuration configuration;
test_class.type: Configuration
test_class.var_name: configuration
test_class.declarator: activity
test_class.modifier: private
test_class.original_string: private RosActivity activity;
test_class.type: RosActivity
test_class.var_name: activity
test_class.declarator: spaceEnvironment
test_class.modifier: private
test_class.original_string: private InteractiveSpacesEnvironment spaceEnvironment;
test_class.type: InteractiveSpacesEnvironment
test_class.var_name: spaceEnvironment
test_class.declarator: timeProvider
test_class.modifier: private
test_class.original_string: private TimeProvider timeProvider;
test_class.type: TimeProvider
test_class.var_name: timeProvider
test_class.declarator: activityComponentContextInOrder
test_class.modifier: private
test_class.original_string: private InOrder activityComponentContextInOrder;
test_class.type: InOrder
test_class.var_name: activityComponentContextInOrder
test_class.declarator: log
test_class.modifier: private
test_class.original_string: private Log log;
test_class.type: Log
test_class.var_name: log
test_class.declarator: executionContext
test_class.modifier: private
test_class.original_string: private ActivityExecutionContext executionContext;
test_class.type: ActivityExecutionContext
test_class.var_name: executionContext
test_class.file: activityapi/interactivespaces-activity-core/src/test/java/interactivespaces/activity/component/route/ros/BasicRosMessageRouterActivityComponentTest.java
test_class.identifier: BasicRosMessageRouterActivityComponentTest
test_case.body: @Test
    public void testHandlerSuccess() {
      configuration.setValue("space.activity.routes.inputs", "foo");
      configuration.setValue("space.activity.route.input.foo", "bar");
  
      component.setComponentContext(activityComponentContext);
      component.configureComponent(configuration);
  
      Mockito.when(activityComponentContext.canHandlerRun()).thenReturn(true);
  
      String channelName = "foo";
      String message = "bar";
      component.handleNewIncomingMessage(channelName, message);
  
      Mockito.verify(messageListener).onNewRoutableInputMessage(channelName, message);
  
      activityComponentContextInOrder.verify(activityComponentContext).enterHandler();
      activityComponentContextInOrder.verify(activityComponentContext).exitHandler();
    }
test_case.class_method_signature: BasicRosMessageRouterActivityComponentTest.testHandlerSuccess()
test_case.full_signature: @Test public void testHandlerSuccess()
test_case.identifier: testHandlerSuccess
test_case.invocations: setValue setValue setComponentContext configureComponent thenReturn when canHandlerRun handleNewIncomingMessage onNewRoutableInputMessage verify enterHandler verify exitHandler verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testHandlerSuccess()
focal_class.declarator: rosActivityComponent
focal_class.modifier: private
focal_class.original_string: private RosActivityComponent rosActivityComponent;
focal_class.type: RosActivityComponent
focal_class.var_name: rosActivityComponent
focal_class.declarator: running
focal_class.modifier: private volatile
focal_class.original_string: private volatile boolean running;
focal_class.type: boolean
focal_class.var_name: running
focal_class.declarator: messageListener
focal_class.modifier: private final
focal_class.original_string: private final RoutableInputMessageListener<T> messageListener;
focal_class.type: RoutableInputMessageListener<T>
focal_class.var_name: messageListener
focal_class.declarator: rosMessageType
focal_class.modifier: private final
focal_class.original_string: private final String rosMessageType;
focal_class.type: String
focal_class.var_name: rosMessageType
focal_class.declarator: inputs = Maps.newConcurrentMap()
focal_class.modifier: private final
focal_class.original_string: private final Map<String, RosSubscribers<T>> inputs = Maps.newConcurrentMap();
focal_class.type: Map<String, RosSubscribers<T>>
focal_class.var_name: inputs
focal_class.declarator: inputTopics = new ConcurrentSkipListMap<String, String>()
focal_class.modifier: private final
focal_class.original_string: private final Map<String, String> inputTopics = new ConcurrentSkipListMap<String, String>();
focal_class.type: Map<String, String>
focal_class.var_name: inputTopics
focal_class.declarator: outputs = Maps.newConcurrentMap()
focal_class.modifier: private final
focal_class.original_string: private final Map<String, InternalRouteMessagePublisher<T>> outputs = Maps.newConcurrentMap();
focal_class.type: Map<String, InternalRouteMessagePublisher<T>>
focal_class.var_name: outputs
focal_class.declarator: outputTopics = new ConcurrentSkipListMap<String, String>()
focal_class.modifier: private final
focal_class.original_string: private final Map<String, String> outputTopics = new ConcurrentSkipListMap<String, String>();
focal_class.type: Map<String, String>
focal_class.var_name: outputTopics
focal_class.declarator: messageFactory
focal_class.modifier: private
focal_class.original_string: private InternalRouteMessagePublisher<T> messageFactory;
focal_class.type: InternalRouteMessagePublisher<T>
focal_class.var_name: messageFactory
focal_class.declarator: handlerInvocationId = new AtomicLong()
focal_class.modifier: private final
focal_class.original_string: private final AtomicLong handlerInvocationId = new AtomicLong();
focal_class.type: AtomicLong
focal_class.var_name: handlerInvocationId
focal_class.declarator: publisherListener = new BasePublisherListener<T>() {
      @Override
      public void onNewSubscriber(Publisher<T> publisher, SubscriberIdentifier subscriberIdentifier) {
        handleNewSubscriber(publisher, subscriberIdentifier);
      }
    }
focal_class.modifier: private final
focal_class.original_string: private final PublisherListener<T> publisherListener = new BasePublisherListener<T>() {
      @Override
      public void onNewSubscriber(Publisher<T> publisher, SubscriberIdentifier subscriberIdentifier) {
        handleNewSubscriber(publisher, subscriberIdentifier);
      }
    };
focal_class.type: PublisherListener<T>
focal_class.var_name: publisherListener
focal_class.declarator: subscriberListener = new BaseSubscriberListener<T>() {
      @Override
      public void onNewPublisher(Subscriber<T> subscriber, PublisherIdentifier publisherIdentifier) {
        handleNewPublisher(subscriber, publisherIdentifier);
      }
    }
focal_class.modifier: private final
focal_class.original_string: private final SubscriberListener<T> subscriberListener = new BaseSubscriberListener<T>() {
      @Override
      public void onNewPublisher(Subscriber<T> subscriber, PublisherIdentifier publisherIdentifier) {
        handleNewPublisher(subscriber, publisherIdentifier);
      }
    };
focal_class.type: SubscriberListener<T>
focal_class.var_name: subscriberListener
focal_class.file: activityapi/interactivespaces-activity-core/src/main/java/interactivespaces/activity/component/route/ros/BasicRosMessageRouterActivityComponent.java
focal_class.identifier: BasicRosMessageRouterActivityComponent
focal_class.class_method_signature: BasicRosMessageRouterActivityComponent.BasicRosMessageRouterActivityComponent(String rosMessageType,
        RoutableInputMessageListener<T> messageListener)
focal_class.full_signature: public  BasicRosMessageRouterActivityComponent(String rosMessageType,
        RoutableInputMessageListener<T> messageListener)
focal_class.identifier: BasicRosMessageRouterActivityComponent
focal_class.modifiers: public
focal_class.parameters: (String rosMessageType,
        RoutableInputMessageListener<T> messageListener)
focal_class.signature:  BasicRosMessageRouterActivityComponent(String rosMessageType,
        RoutableInputMessageListener<T> messageListener)
focal_class.class_method_signature: BasicRosMessageRouterActivityComponent.getName()
focal_class.full_signature: @Override public String getName()
focal_class.identifier: getName
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getName()
focal_class.class_method_signature: BasicRosMessageRouterActivityComponent.getDescription()
focal_class.full_signature: @Override public String getDescription()
focal_class.identifier: getDescription
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getDescription()
focal_class.class_method_signature: BasicRosMessageRouterActivityComponent.getBaseDependencies()
focal_class.full_signature: @Override public List<String> getBaseDependencies()
focal_class.identifier: getBaseDependencies
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: List<String>
focal_class.signature: List<String> getBaseDependencies()
focal_class.class_method_signature: BasicRosMessageRouterActivityComponent.onConfigureComponent(Configuration configuration)
focal_class.full_signature: @Override protected void onConfigureComponent(Configuration configuration)
focal_class.identifier: onConfigureComponent
focal_class.modifiers: @Override protected
focal_class.parameters: (Configuration configuration)
focal_class.return: void
focal_class.signature: void onConfigureComponent(Configuration configuration)
focal_class.class_method_signature: BasicRosMessageRouterActivityComponent.onPostStartupComponent()
focal_class.full_signature: @Override public void onPostStartupComponent()
focal_class.identifier: onPostStartupComponent
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void onPostStartupComponent()
focal_class.class_method_signature: BasicRosMessageRouterActivityComponent.shutdownComponent()
focal_class.full_signature: @Override public void shutdownComponent()
focal_class.identifier: shutdownComponent
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void shutdownComponent()
focal_class.class_method_signature: BasicRosMessageRouterActivityComponent.isComponentRunning()
focal_class.full_signature: @Override public boolean isComponentRunning()
focal_class.identifier: isComponentRunning
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isComponentRunning()
focal_class.class_method_signature: BasicRosMessageRouterActivityComponent.getNodeName()
focal_class.full_signature: @Override public String getNodeName()
focal_class.identifier: getNodeName
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getNodeName()
focal_class.class_method_signature: BasicRosMessageRouterActivityComponent.newMessage()
focal_class.full_signature: @Override public T newMessage()
focal_class.identifier: newMessage
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: T
focal_class.signature: T newMessage()
focal_class.class_method_signature: BasicRosMessageRouterActivityComponent.registerOutputChannelTopic(String channelId, Set<String> topicNames,
        boolean latch)
focal_class.full_signature: @Override public synchronized RouteMessagePublisher<T> registerOutputChannelTopic(String channelId, Set<String> topicNames,
        boolean latch)
focal_class.identifier: registerOutputChannelTopic
focal_class.modifiers: @Override public synchronized
focal_class.parameters: (String channelId, Set<String> topicNames,
        boolean latch)
focal_class.return: RouteMessagePublisher<T>
focal_class.signature: RouteMessagePublisher<T> registerOutputChannelTopic(String channelId, Set<String> topicNames,
        boolean latch)
focal_class.class_method_signature: BasicRosMessageRouterActivityComponent.registerInputChannelTopic(final String channelId, Set<String> topicNames)
focal_class.full_signature: @Override public synchronized void registerInputChannelTopic(final String channelId, Set<String> topicNames)
focal_class.identifier: registerInputChannelTopic
focal_class.modifiers: @Override public synchronized
focal_class.parameters: (final String channelId, Set<String> topicNames)
focal_class.return: void
focal_class.signature: void registerInputChannelTopic(final String channelId, Set<String> topicNames)
focal_class.class_method_signature: BasicRosMessageRouterActivityComponent.clearAllChannelTopics()
focal_class.full_signature: @Override public synchronized void clearAllChannelTopics()
focal_class.identifier: clearAllChannelTopics
focal_class.modifiers: @Override public synchronized
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clearAllChannelTopics()
focal_class.class_method_signature: BasicRosMessageRouterActivityComponent.handleNewIncomingMessage(String channelId, T message)
focal_class.full_signature:  void handleNewIncomingMessage(String channelId, T message)
focal_class.identifier: handleNewIncomingMessage
focal_class.parameters: (String channelId, T message)
focal_class.return: void
focal_class.signature: void handleNewIncomingMessage(String channelId, T message)
focal_class.class_method_signature: BasicRosMessageRouterActivityComponent.writeOutputMessage(String outputChannelId, T message)
focal_class.full_signature: @Override public void writeOutputMessage(String outputChannelId, T message)
focal_class.identifier: writeOutputMessage
focal_class.modifiers: @Override public
focal_class.parameters: (String outputChannelId, T message)
focal_class.return: void
focal_class.signature: void writeOutputMessage(String outputChannelId, T message)
focal_class.class_method_signature: BasicRosMessageRouterActivityComponent.newHandlerInvocationId()
focal_class.full_signature: private String newHandlerInvocationId()
focal_class.identifier: newHandlerInvocationId
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String newHandlerInvocationId()
focal_class.class_method_signature: BasicRosMessageRouterActivityComponent.getComponentStatusDetail()
focal_class.full_signature: @Override public String getComponentStatusDetail()
focal_class.identifier: getComponentStatusDetail
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getComponentStatusDetail()
focal_class.class_method_signature: BasicRosMessageRouterActivityComponent.getOutputChannelIds()
focal_class.full_signature: @Override public Set<String> getOutputChannelIds()
focal_class.identifier: getOutputChannelIds
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Set<String>
focal_class.signature: Set<String> getOutputChannelIds()
focal_class.class_method_signature: BasicRosMessageRouterActivityComponent.getMessagePublisher(String outputChannelId)
focal_class.full_signature: @Override public RouteMessagePublisher<T> getMessagePublisher(String outputChannelId)
focal_class.identifier: getMessagePublisher
focal_class.modifiers: @Override public
focal_class.parameters: (String outputChannelId)
focal_class.return: RouteMessagePublisher<T>
focal_class.signature: RouteMessagePublisher<T> getMessagePublisher(String outputChannelId)
focal_class.class_method_signature: BasicRosMessageRouterActivityComponent.getInputChannelIds()
focal_class.full_signature: @Override public Set<String> getInputChannelIds()
focal_class.identifier: getInputChannelIds
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Set<String>
focal_class.signature: Set<String> getInputChannelIds()
focal_class.class_method_signature: BasicRosMessageRouterActivityComponent.makeRouteDetail(String className, String key, String bridge, String value)
focal_class.full_signature: private String makeRouteDetail(String className, String key, String bridge, String value)
focal_class.identifier: makeRouteDetail
focal_class.modifiers: private
focal_class.parameters: (String className, String key, String bridge, String value)
focal_class.return: String
focal_class.signature: String makeRouteDetail(String className, String key, String bridge, String value)
focal_class.class_method_signature: BasicRosMessageRouterActivityComponent.handleNewSubscriber(Publisher<T> publisher, SubscriberIdentifier subscriberIdentifier)
focal_class.full_signature: private void handleNewSubscriber(Publisher<T> publisher, SubscriberIdentifier subscriberIdentifier)
focal_class.identifier: handleNewSubscriber
focal_class.modifiers: private
focal_class.parameters: (Publisher<T> publisher, SubscriberIdentifier subscriberIdentifier)
focal_class.return: void
focal_class.signature: void handleNewSubscriber(Publisher<T> publisher, SubscriberIdentifier subscriberIdentifier)
focal_class.class_method_signature: BasicRosMessageRouterActivityComponent.handleNewPublisher(Subscriber<T> subscriber, PublisherIdentifier publisherIdentifier)
focal_class.full_signature: private void handleNewPublisher(Subscriber<T> subscriber, PublisherIdentifier publisherIdentifier)
focal_class.identifier: handleNewPublisher
focal_class.modifiers: private
focal_class.parameters: (Subscriber<T> subscriber, PublisherIdentifier publisherIdentifier)
focal_class.return: void
focal_class.signature: void handleNewPublisher(Subscriber<T> subscriber, PublisherIdentifier publisherIdentifier)
focal_class.superclass: extends BaseRosMessageRouterActivityComponent<T>
focal_method.body: void handleNewIncomingMessage(String channelId, T message) {
      if (!getComponentContext().canHandlerRun()) {
        return;
      }
  
      try {
        getComponentContext().enterHandler();
  
        TimeProvider timeProvider = getComponentContext().getActivity().getSpaceEnvironment().getTimeProvider();
        long start = timeProvider.getCurrentTime();
        String handlerInvocationId = newHandlerInvocationId();
        Log log = getComponentContext().getActivity().getLog();
        if (log.isTraceEnabled()) {
          log.trace(String.format("Entering ROS route message handler invocation %s", handlerInvocationId));
        }
  
        // Send the message out to the listener.
        messageListener.onNewRoutableInputMessage(channelId, message);
  
        if (log.isTraceEnabled()) {
          log.trace(String.format("Exiting ROS route message handler invocation %s after %dms",
              handlerInvocationId, timeProvider.getCurrentTime() - start));
        }
      } catch (Throwable e) {
        handleError(String.format("Error after receiving routing message for channel %s", channelId), e);
      } finally {
        getComponentContext().exitHandler();
      }
    }
focal_method.class_method_signature: BasicRosMessageRouterActivityComponent.handleNewIncomingMessage(String channelId, T message)
focal_method.full_signature:  void handleNewIncomingMessage(String channelId, T message)
focal_method.identifier: handleNewIncomingMessage
focal_method.invocations: canHandlerRun getComponentContext enterHandler getComponentContext getTimeProvider getSpaceEnvironment getActivity getComponentContext getCurrentTime newHandlerInvocationId getLog getActivity getComponentContext isTraceEnabled trace format onNewRoutableInputMessage isTraceEnabled trace format getCurrentTime handleError format exitHandler getComponentContext
focal_method.parameters: (String channelId, T message)
focal_method.return: void
focal_method.signature: void handleNewIncomingMessage(String channelId, T message)