Interface QueryAgent

    • Method Detail

      • query

        ComponentAgent query​(String selector)
        to find the first component agent with the selector in this query agent.
        Parameters:
        selector - the selector
        Returns:
        the first component agent, null if not found
      • queryAll

        List<ComponentAgent> queryAll​(String selector)
        to find the component agents with the selector in this query agent.
        Parameters:
        selector - the selector
        Returns:
        the component agents
      • as

        <T> T as​(Class<T> clazz)
        Try to get a instance of target class for this query agent, the target class is usually a OperationAgent or a native Component
        if it cannot get a instance of target class, it will throw AgentException.
        Parameters:
        clazz - class of specify operation.
        Returns:
        operation object.
      • is

        <T> boolean is​(Class<T> clazz)
        Can get a instance of target class for this query agent.
        Parameters:
        clazz - the class cast to.
        Returns:
        true if can get a instance of target class