Class LocalMessageEnvironment

    • Field Detail

      • LOCAL_MESSAGE_ENVIRONMENT_CONFIGURATION

        public static final org.apache.reef.tang.Configuration LOCAL_MESSAGE_ENVIRONMENT_CONFIGURATION
    • Method Detail

      • setupListener

        public <T> void setupListener​(java.lang.String listenerId,
                                      MessageListener<T> listener)
        Description copied from interface: MessageEnvironment
        Set up a MessageListener with a listener id.
        Specified by:
        setupListener in interface MessageEnvironment
        Type Parameters:
        T - The type of the message to be sent in the environment
        Parameters:
        listenerId - an identifier of the message listener
        listener - a message listener
      • asyncConnect

        public <T> java.util.concurrent.Future<MessageSender<T>> asyncConnect​(java.lang.String targetId,
                                                                              java.lang.String messageTypeId)
        Description copied from interface: MessageEnvironment
        Asynchronously connect to the node called receiverId and return a future of MessageSender that sends messages to the listener with listenerId.
        Specified by:
        asyncConnect in interface MessageEnvironment
        Type Parameters:
        T - The type of the message to be sent in the environment
        Parameters:
        targetId - a receiver id
        messageTypeId - an identifier of the message listener
        Returns:
        a message sender
      • getId

        public java.lang.String getId()
        Specified by:
        getId in interface MessageEnvironment
        Returns:
        identifier for this node