Interface RPCConversationContext



  • public interface RPCConversationContext
    Context of RPC conversation. Context is used for calling conversation partner and for obtaining further information about the RPC conversation.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void abort​()
      Abort current conversation.
      void callRPCNoreply​(int interfaceHobj, java.lang.String name, sk.ipesoft.d2000.base.UnivalValue<?>[] arguments, RPCConversationFlag conversationFlag)
      Call partners RPC asynchronously.
      int getId​()
      Get internal ID of RPC conversation.
      int getInterfaceHobj​()
      Get HOBJ of ESL interface that declares called RPC or zero if RPC is not declared by ESL interface.
      boolean isMeInitiator​()
      Initiator of the conversation gets true, target of the conversation gets false.
      boolean isToMeOpened​()
      Get true if receiving messages from the partner is possible.
      boolean isToPartnerOpened​()
      Get true if sending messages to the partner is possible.
    • Method Detail

      • abort

        void abort​()
        Abort current conversation. Partner is notified about RPC conversation abortion.
        Throws:
        java.lang.IllegalStateException - when the conversation has been already closed for sending messages.
      • callRPCNoreply

        void callRPCNoreply​(int interfaceHobj,
                            java.lang.String name,
                            sk.ipesoft.d2000.base.UnivalValue<?>[] arguments,
                            RPCConversationFlag conversationFlag)
        Call partners RPC asynchronously.
        Parameters:
        interfaceHobj - HOBJ of ESL interface if called method is implementation
        name - name of called RPC
        arguments - arguments of RPC call
        conversationFlag - flag indicating state of the RPC conversation
        Throws:
        java.lang.IllegalStateException - when the conversation has been already closed for sending messages.
      • getId

        int getId​()
        Get internal ID of RPC conversation.

        ID is unique only in combination with isMeInitiator() and only during one moment. IDs are recycled after conversation's closure or abortion.

        Returns:
        internal ID
      • getInterfaceHobj

        int getInterfaceHobj​()
        Get HOBJ of ESL interface that declares called RPC or zero if RPC is not declared by ESL interface.
        Returns:
        HOBJ or zero.
      • isToPartnerOpened

        boolean isToPartnerOpened​()
        Get true if sending messages to the partner is possible.
        Returns:
        true if sending messages to the partner is possible
      • isMeInitiator

        boolean isMeInitiator​()
        Initiator of the conversation gets true, target of the conversation gets false.
        Returns:
        true to initiator of the conversation.
      • isToMeOpened

        boolean isToMeOpened​()
        Get true if receiving messages from the partner is possible.
        Returns:
        true if receiving messages from the partner is possible