public class SubscriberFactory
extends java.lang.Object
Subscriber
instances.Constructor and Description |
---|
SubscriberFactory(NodeIdentifier nodeIdentifier,
TopicParticipantManager topicParticipantManager,
java.util.concurrent.ScheduledExecutorService executorService) |
Modifier and Type | Method and Description |
---|---|
<T> Subscriber<T> |
newOrExisting(TopicDeclaration topicDeclaration,
org.ros.message.MessageDeserializer<T> messageDeserializer)
Gets or creates a
Subscriber instance. |
public SubscriberFactory(NodeIdentifier nodeIdentifier, TopicParticipantManager topicParticipantManager, java.util.concurrent.ScheduledExecutorService executorService)
public <T> Subscriber<T> newOrExisting(TopicDeclaration topicDeclaration, org.ros.message.MessageDeserializer<T> messageDeserializer)
Subscriber
instance. Subscriber
s are
cached and reused per topic. When a new Subscriber
is generated, it
is registered with the master.T
- the message type associated with the new Subscriber
topicDeclaration
- TopicDeclaration
that is subscribed tomessageDeserializer
- the MessageDeserializer
to use for incoming messagesSubscriber
instance