Class RemoteExecutionComponentFeature

    • Field Detail

      • DEBUG

        public static final boolean DEBUG
        Put string representation of command in message header.
        See Also:
        Constant Field Values
      • RX_ID

        public static final java.lang.String RX_ID
        ID of the remote execution command in progress.
        See Also:
        Constant Field Values
      • RX_DEBUG

        public static final java.lang.String RX_DEBUG
        Debug info of the remote execution command.
        See Also:
        Constant Field Values
      • SAFE_COMMANDS

        protected static final java.util.Set<java.lang.Class<?>> SAFE_COMMANDS
        Commands safe to use with untrusted clients.
      • incommands

        protected java.util.Map<java.lang.String,​jadex.commons.future.IFuture<?>> incommands
        Commands that have been received to be executed locally. Stored to allow termination etc.
    • Method Detail

      • execute

        public <T> jadex.commons.future.IFuture<T> execute​(IComponentIdentifier target,
                                                           IRemoteCommand<T> command,
                                                           java.lang.Class<? extends jadex.commons.future.IFuture<T>> clazz,
                                                           java.lang.Long timeout)
        Execute a command on a remote agent.
        Specified by:
        execute in interface IRemoteExecutionFeature
        Parameters:
        target - The component to send the command to.
        command - The command to be executed.
        clazz - The return type.
        timeout - Custom timeout or null for default.
        Returns:
        The result(s) of the command, if any.
      • executeRemoteMethod

        public <T> jadex.commons.future.IFuture<T> executeRemoteMethod​(RemoteReference ref,
                                                                       java.lang.reflect.Method method,
                                                                       java.lang.Object[] args)
        Invoke a method on a remote object.
        Specified by:
        executeRemoteMethod in interface IInternalRemoteExecutionFeature
        Parameters:
        ref - The target reference.
        method - The method to be executed.
        args - The arguments.
        Returns:
        The result(s) of the method invocation, if any. Connects any futures involved.
      • sendRxMessage

        protected jadex.commons.future.IFuture<java.lang.Void> sendRxMessage​(IComponentIdentifier receiver,
                                                                             java.lang.String rxid,
                                                                             java.lang.Object msg)
        Sends RX message.
        Parameters:
        receiver - The receiver.
        rxid - The remote execution ID.
        msg - The message.
        Returns:
        Null, when sent.