Class MessageConnectionFactory

java.lang.Object
org.eclipse.net4j.util.factory.Factory
org.eclipse.spi.net4j.MessageConnectionFactory
All Implemented Interfaces:
org.eclipse.net4j.util.factory.IFactory, org.eclipse.net4j.util.factory.IFactoryKeyAware

public abstract class MessageConnectionFactory extends org.eclipse.net4j.util.factory.Factory
Provider SPI for creating a fresh asynchronous message connection for one owning Net4j connector.

Factories are registered in the managed container under PRODUCT_GROUP; the factory type selects a provider and the description supplies provider-specific connection input. A factory may also hold shared configuration, such as an HTTP client or timeout. Each returned connection has independent runtime state, is not started until its connector activates, and is owned by that connector; the factory itself is owned by the container.

Since:
4.23
Author:
Eike Stepper
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The product group used to register providers of MessageConnector.IMessageConnection instances.

    Fields inherited from class org.eclipse.net4j.util.factory.Factory

    NO_DESCRIPTION
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Creates a factory registered under the message-connection product group.
  • Method Summary

    Modifier and Type
    Method
    Description
    create(String description)
    Creates an independent, not-yet-started message connection.

    Methods inherited from class org.eclipse.net4j.util.factory.Factory

    getDescriptionFor, getFactoryKey, getKey, getProductGroup, getType, productCreationException, productCreationException, setFactoryKey, toString

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • MessageConnectionFactory

      protected MessageConnectionFactory(String type)
      Creates a factory registered under the message-connection product group.
      Parameters:
      type - the provider name used as the factory type
  • Method Details

    • create

      public abstract MessageConnector.IMessageConnection create(String description) throws org.eclipse.net4j.util.factory.ProductCreationException
      Creates an independent, not-yet-started message connection. Implementations may combine the description with configuration shared by the factory, but the returned connection must have independent runtime state from connections created for other connectors.
      Parameters:
      description - provider-specific connection configuration
      Returns:
      a new connection owned by the requesting connector
      Throws:
      org.eclipse.net4j.util.factory.ProductCreationException - if the configuration cannot be parsed or the connection cannot be created