Annotation InitiatedBy

  • All Implemented Interfaces:

    @Target(value = TYPE)@Documented()@Retention(value = RUNTIME) 
    public @interface InitiatedBy

    InitiatedBy specifies the protocol name that triggers a ResponderFlow as a consequence of a counterparty requesting a new session.

    Any flows that participate in flow sessions must declare a protocol name, using protocol and protocol. The platform will use the protocol name to establish what [ResponderFlow] to invoke on the responder side when the initiator side creates a session.

    For example, to set up an initiator-responder pair, declare the following:

    = "myprotocol")
    class MyFlowInitiator : Flow {
    = "myprotocol")
    class MyFlowResponder : ResponderFlow {
    Flows may also optionally declare a range of protocol versions they support. By default, flows support protocol version 1 only. When initiating a flow, the platform will look for the highest supported protocol version as declared on the initiating side and start that flow on the responder side.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Modifier and Type Field Description
    • Constructor Summary

      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract String protocol()
      abstract Array<int> version()
      • Methods inherited from class java.lang.annotation.Annotation

        annotationType, equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • protocol

         abstract String protocol()

        The protocol that the annotated flow is initiated by.

      • version

         abstract Array<int> version()

        The protocol version.