View Javadoc

1   /*
2    * $Id: TransportServiceDescriptor.java 10961 2008-02-22 19:01:02Z dfeist $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.transport.service;
12  
13  import org.mule.api.MuleException;
14  import org.mule.api.endpoint.EndpointURIBuilder;
15  import org.mule.api.endpoint.InboundEndpoint;
16  import org.mule.api.registry.ServiceDescriptor;
17  import org.mule.api.service.Service;
18  import org.mule.api.transaction.TransactionFactory;
19  import org.mule.api.transport.Connector;
20  import org.mule.api.transport.MessageAdapter;
21  import org.mule.api.transport.MessageDispatcherFactory;
22  import org.mule.api.transport.MessageReceiver;
23  import org.mule.api.transport.MessageRequesterFactory;
24  import org.mule.api.transport.SessionHandler;
25  
26  import java.util.List;
27  import java.util.Properties;
28  
29  /**
30   * <code>TransportServiceDescriptor</code> describes the necessary information for
31   * creating a connector from a service descriptor. A service descriptor should be
32   * located at META-INF/services/org/mule/providers/<protocol> where protocol is the
33   * protocol of the connector to be created The service descriptor is in the form of
34   * string key value pairs and supports a number of properties, descriptions of which
35   * can be found here: http://www.muledocs.org/Transport+Service+Descriptors.
36   */
37  public interface TransportServiceDescriptor extends ServiceDescriptor
38  {
39      public MessageAdapter createMessageAdapter(Object message) throws TransportServiceException;
40  
41      public SessionHandler createSessionHandler() throws TransportServiceException;
42  
43      public MessageReceiver createMessageReceiver(Connector connector,
44                                                               Service service,
45                                                               InboundEndpoint endpoint) throws MuleException;
46  
47      public MessageReceiver createMessageReceiver(Connector connector,
48                                                               Service service,
49                                                               InboundEndpoint endpoint,
50                                                               Object[] args) throws MuleException;
51  
52      public MessageDispatcherFactory createDispatcherFactory() throws TransportServiceException;
53  
54      public MessageRequesterFactory createRequesterFactory() throws TransportServiceException;
55  
56      public TransactionFactory createTransactionFactory() throws TransportServiceException;
57  
58      public Connector createConnector() throws TransportServiceException;
59  
60      public List createInboundTransformers() throws TransportFactoryException;
61  
62      public List createOutboundTransformers() throws TransportFactoryException;
63  
64      public List createResponseTransformers() throws TransportFactoryException;
65  
66      public EndpointURIBuilder createEndpointBuilder() throws TransportFactoryException;
67  
68      public void setExceptionMappings(Properties props);
69  
70      public Properties getExceptionMappings();
71  
72  }