Package com.bea.wli.sb.transports
Interface TransportProvider
- All Known Subinterfaces:
SelfDescribedTransportProvider
public interface TransportProvider
Represents the central point for management of transport protocol-specific
configuration and runtime properties. There is a single instance of
TransportProvider object for every supported protocol, e.g. there is a single
instance of HTTP Transport Provider, JMS Transport Provider, etc.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
called once per every create/update/delete/suspend/resume call to signal that the activate action has completed with respect to the corresponding endpoint object Does not imply success or failure of the overall session activation! The provider is not allowed to throw exceptions as there is no way to recover at this point.createEndPoint
(EndPointOperations.Create context) Create and deploy an outbound or inbound endpoint on this server The semantics of this operation is as follows: prepare whatever is necessary for this endpoint to be operational, but it cannot process messages on this until a activationComplete() call has been received.void
deleteEndPoint
(EndPointOperations.Delete context) Delete an endpoint associated with the given service referenceGiven a proxy service reference returns a map of string properties that contains name/value pairs which are all the necessary provider-specific attributes for a business service object to be instantiated (on a different OSB domain) that can invoke this proxy service.getEndPoint
(Ref ref) org.apache.xmlbeans.SchemaType
Collection<? extends TransportEndPoint>
getEnvValues
(Ref ref, com.bea.wli.sb.transports.EndPointConfiguration epConfig) Transport providers return any environment dependent values via this call.getExternalReferences
(com.bea.wli.sb.transports.EndPointConfiguration epConfig) Returns a collection of external references for a given end point configuration This is called by the configuration frameworkgetId()
com.bea.wli.sb.transports.TransportProviderConfiguration
org.apache.xmlbeans.XmlObject
getProviderSpecificConfiguration
(Ref ref, Map<String, String> props) Given a map of properties object from one OSB domain returns a transport endpoint configuration that can be used to instantiate a business service on another OSB domain.org.apache.xmlbeans.SchemaType
org.apache.xmlbeans.SchemaType
org.apache.xmlbeans.SchemaType
org.apache.xmlbeans.SchemaType
getUIBinding
(TransportUIContext context) Called at service definition time to get the provider-specific binding object that validates provider-specific properties are present in the UI context.void
resumeEndPoint
(EndPointOperations.Resume context) Resumes (Re-enables) a previously suspended endpoint with the given service referencevoid
sendMessageAsync
(TransportSender sender, TransportSendListener listener, TransportOptions options) Sends an outbound message to an external service.void
setEnvValues
(Ref ref, com.bea.wli.sb.transports.EndPointConfiguration epConfig, Collection<NonQualifiedEnvValue> envValues) Sets the given collection of environment values in the data.void
setExternalReferences
(Map<Ref, Ref> mapRefs, com.bea.wli.sb.transports.EndPointConfiguration epConfig) Sets the external references for a given endpoint configuration in place.void
shutdown()
Called by the TransportManager when the server is shutting downvoid
Suspends (disables) the endpoint with the given service referenceupdateEndPoint
(EndPointOperations.Update context) Updates the existing endpoint with new configuration.void
Provides syntactic and semantic validation of endpoint configuration according to a given transport provider-specific logic.
-
Method Details
-
getId
String getId()- Returns:
- a unique string that identifies this provider, like "http"
-
validateEndPointConfiguration
Provides syntactic and semantic validation of endpoint configuration according to a given transport provider-specific logic. The result of the validation is put into the diagnostics object. Exceptions should not be thrown from this method, instead an appropriate diagnostics object should be returned.- Parameters:
context
- context for validation. Providers can use this to extract locale, service information and diagnostics object
-
createEndPoint
Create and deploy an outbound or inbound endpoint on this server The semantics of this operation is as follows: prepare whatever is necessary for this endpoint to be operational, but it cannot process messages on this until a activationComplete() call has been received.- Parameters:
context
- context for create operation. Providers can use this to extract endpoint configuration, service reference, etc.- Throws:
TransportException
-
updateEndPoint
Updates the existing endpoint with new configuration. The return value from this method has to be a difference instance of TransportEndPoint object than that which previously existed. The semantics are: prepare for update, but do not update until activationComplete call has been received.- Parameters:
context
- context for update operation. Providers can use this to extract endpoint configuration, service reference, etc.- Throws:
TransportException
-
suspendEndPoint
Suspends (disables) the endpoint with the given service reference- Parameters:
context
- context for suspend operation. Providers can use this to extract endpoint configuration, service reference, etc.- Throws:
TransportException
-
resumeEndPoint
Resumes (Re-enables) a previously suspended endpoint with the given service reference- Parameters:
context
- context for resume operation. Providers can use this to extract endpoint configuration, service reference, etc.- Throws:
TransportException
-
deleteEndPoint
Delete an endpoint associated with the given service reference- Parameters:
context
- context for delete operation. Providers can use this to extract service reference, etc.- Throws:
TransportException
-
activationComplete
called once per every create/update/delete/suspend/resume call to signal that the activate action has completed with respect to the corresponding endpoint object Does not imply success or failure of the overall session activation! The provider is not allowed to throw exceptions as there is no way to recover at this point.- Parameters:
context
- context for operation that has been performed. Providers can use this to extract endpoint configuration, service reference, etc.
-
getEndPoints
- Returns:
- the list of all inbound and outbound endpoints for this provider
- Throws:
TransportException
-
getEndPoint
- Returns:
- an endpoint with a given service reference
- Throws:
TransportException
-
sendMessageAsync
void sendMessageAsync(TransportSender sender, TransportSendListener listener, TransportOptions options) throws TransportException Sends an outbound message to an external service. The caller provides a callback with is called when the response is received from an external service. The semantics of the send operation are specific to the transport implementation.- Parameters:
sender
- an instance of either ServiceTransportSender or NoServiceTransportSender interface will be providedlistener
- a callback object the transport provider needs to invoke asynchronously when the send operation is completed (for one-way requests) or when the response has been received (for request-response requests)options
- various options having to do with desired quality of service, the mode, etc on the outbound request- Throws:
TransportException
-
getEndPointConfigurationSchemaType
- Returns:
- the XML schema type for the endpoint configuration for this provider
- Throws:
TransportException
-
getRequestMetaDataSchemaType
- Returns:
- the XML schema type of the request meta data for this provider
- Throws:
TransportException
-
getRequestHeadersSchemaType
- Returns:
- the XML schema type of the request headers for this provider. If provider does not support request headers, return null.
- Throws:
TransportException
-
getResponseMetaDataSchemaType
- Returns:
- the XML schema type of the response meta data for this provider
- Throws:
TransportException
-
getResponseHeadersSchemaType
- Returns:
- the XML schema type of the response headers for this provider. If provider does not support response headers, return null.
- Throws:
TransportException
-
getProviderConfiguration
com.bea.wli.sb.transports.TransportProviderConfiguration getProviderConfiguration() throws TransportException- Returns:
- the XML document for the static properties for this provider
- Throws:
TransportException
-
getUIBinding
Called at service definition time to get the provider-specific binding object that validates provider-specific properties are present in the UI context. The user interface will pass in a brand new instance of TransportUIContext object for every time the user navigates the wizard. A typical pattern for the provider is create a new instance of the TransportUIBinding object and save the reference to the context and refer to it as needed.- Parameters:
context
- context for UI binding. Providers can use this to extract locale, proxy information, etc.- Returns:
- UI binding object that is used by OSB console to refer provider-specific parts of the service configuration wizard
- Throws:
TransportException
-
shutdown
Called by the TransportManager when the server is shutting down- Throws:
TransportException
-
getEnvValues
Collection<NonQualifiedEnvValue> getEnvValues(Ref ref, com.bea.wli.sb.transports.EndPointConfiguration epConfig) throws TransportException Transport providers return any environment dependent values via this call. Environment dependent values are those that may need to be changed when moving configuration from one domain to another.- Parameters:
ref
- service referenceepConfig
- service endpoint configuration- Returns:
- a collection of environment values, or null if there are none for this endpoint
- Throws:
TransportException
-
setEnvValues
void setEnvValues(Ref ref, com.bea.wli.sb.transports.EndPointConfiguration epConfig, Collection<NonQualifiedEnvValue> envValues) throws TransportException Sets the given collection of environment values in the data. the collectoin of envValues may be only a subset of all existing env values in the data. The implementations can update the data in-place and return it, rather than returning a copy of the data. This is called by the configuration framework- Parameters:
ref
- service referenceepConfig
- service endpoint configurationenvValues
- collection of environment values to set- Throws:
TransportException
-
getExternalReferences
Collection<Ref> getExternalReferences(com.bea.wli.sb.transports.EndPointConfiguration epConfig) throws TransportException Returns a collection of external references for a given end point configuration This is called by the configuration framework- Parameters:
epConfig
- service endpoint configuration- Returns:
- collection of external references
- Throws:
TransportException
-
setExternalReferences
void setExternalReferences(Map<Ref, Ref> mapRefs, com.bea.wli.sb.transports.EndPointConfiguration epConfig) throws TransportExceptionSets the external references for a given endpoint configuration in place. The keys in the map are references from existing endpoint configuration and the values are the new values to replace those existing ones in the endpoint configuration. This is called by the configuration framework- Parameters:
mapRefs
- map of referencesepConfig
- service endpoint configuration- Throws:
TransportException
-
getBusinessServicePropertiesForProxy
Given a proxy service reference returns a map of string properties that contains name/value pairs which are all the necessary provider-specific attributes for a business service object to be instantiated (on a different OSB domain) that can invoke this proxy service. All the fields that are exposed will be externalized by the transport provider (for e.g. replace occurrences of localhost with actual server name etc.). If the transport provider needs a specific business service URI which is different from a proxy URI, the properties object they return should contain a property with a key "URI" and a string value to be used when creating the business service. Only transport providers that support both proxy AND business services (i.e. inbound AND outbound directions) need to support this. Otherwise they can throw an UnsupportedOperationException. This is used in UDDI import/export feature of OSB.- Parameters:
ref
- service reference- Returns:
- map of name/value properties to be persisted
- Throws:
TransportException
-
getProviderSpecificConfiguration
org.apache.xmlbeans.XmlObject getProviderSpecificConfiguration(Ref ref, Map<String, String> props) throws TransportExceptionGiven a map of properties object from one OSB domain returns a transport endpoint configuration that can be used to instantiate a business service on another OSB domain. Only transport providers that support both proxy AND business services (i.e. inbound AND outbound directions) need to support this. Otherwise they can throw an UnsupportedOperationException. This is used in UDDI import/export feature of OSB.- Parameters:
ref
- if not null, it is assumed that there already exists a service endpoint with a given ref, and the result of the method will be a merge of existing configuration and passed in properties.props
- map of name/value properties to be used when creating service endpoint configuration- Returns:
- provider-specific portion of EndPointConfiguration object
- Throws:
TransportException
-