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
FieldsModifier and TypeFieldDescriptionstatic final StringThe product group used to register providers ofMessageConnector.IMessageConnectioninstances.Fields inherited from class org.eclipse.net4j.util.factory.Factory
NO_DESCRIPTION -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a factory registered under the message-connection product group. -
Method Summary
Modifier and TypeMethodDescriptionabstract MessageConnector.IMessageConnectionCreates 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
-
Field Details
-
PRODUCT_GROUP
The product group used to register providers ofMessageConnector.IMessageConnectioninstances.- See Also:
-
-
Constructor Details
-
MessageConnectionFactory
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
-