Package io.mats3

Interface MatsEndpoint.EndpointConfig<R,S>

All Superinterfaces:
MatsConfig
Enclosing interface:
MatsEndpoint<R,S>

public static interface MatsEndpoint.EndpointConfig<R,S> extends MatsConfig
Provides for both configuring the endpoint (before it is started), and introspecting the configuration.
  • Method Details

    • getEndpointId

      String getEndpointId()
      Returns:
      the endpointId if this MatsEndpoint.
    • isSubscription

      boolean isSubscription()
      Returns:
      whether this Endpoint is "subscription based", as when created with MatsFactory.subscriptionTerminator(String, Class, Class, ProcessTerminatorLambda).
    • getReplyClass

      Class<R> getReplyClass()
      Returns:
      the class that will be sent as reply for this endpoint.
    • getStateClass

      Class<S> getStateClass()
      Returns:
      the class used for the endpoint's state.
    • getIncomingClass

      Class<?> getIncomingClass()
      Returns:
      the class expected for incoming messages to this endpoint (decided by the first MatsStage).
    • setOrigin

      Sets the origin for this Endpoint, i.e. where it was created. Use this to set something sane if the automatically created creation info is useless, as it is when Mats' SpringConfig defines the endpoints (thus it employs this method to set something more informative). It should be a single line, no line feeds, but tooling might split the String into multiple lines on the character ';'. It should definitely be short, but informative.
    • getOrigin

      String getOrigin()
      Returns:
      some human-interpretable information about where in the codebase this Endpoint was created. If this is displayed in a multi-line capable situation, you should split on ';'. An attempt at some automatic creation is performed, based on instantiating an exception and introspecting the result. If this doesn't yield any good result, it can be overridden by setOrigin(String), as is done by Mats' SpringConfig.
    • setAttribute

      MatsEndpoint.EndpointConfig<R,S> setAttribute(String key, Object value)
      Description copied from interface: MatsConfig
      Sets an attribute for this entity (factory, endpoint, stage) - can e.g. be used by tooling or interceptors. If the value is null, the mapping for the specified key is cleared.
      Specified by:
      setAttribute in interface MatsConfig
      Parameters:
      key - the key name for this attribute. Not null.
      value - the value for this attribute. If the value is null, the mapping for the specified key is cleared.
      Returns:
      the config object, for method chaining.
    • setConcurrency

      MatsEndpoint.EndpointConfig<R,S> setConcurrency(int concurrency)
      Description copied from interface: MatsConfig
      Changes the default concurrency of the Factory, or of the endpoint (which defaults to the concurrency of the MatsFactory), or of the process stage (which defaults to the concurrency of the MatsEndpoint).

      Will only have effect before the MatsStage is started. Can be reset by stopping, setting, and restarting.

      Setting to 0 will invoke default logic.

      Specified by:
      setConcurrency in interface MatsConfig
      Parameters:
      concurrency - the concurrency for the Factory, or Endpoint, or Stage. If set to 0, default-logic is in effect.
      Returns:
      the config object, for method chaining.
      See Also:
    • setInteractiveConcurrency

      MatsEndpoint.EndpointConfig<R,S> setInteractiveConcurrency(int concurrency)
      Description copied from interface: MatsConfig
      Like MatsConfig.setConcurrency(int), but changes the "interactive concurrency" specifically - this is relevant for the Mats Flows that are initiated with the interactive flag set.
      Specified by:
      setInteractiveConcurrency in interface MatsConfig
      Parameters:
      concurrency - the interactive concurrency for the Factory, or Endpoint, or Stage. If set to 0, default-logic is in effect.
      Returns:
      the config object, for method chaining.
      See Also: