01: /*
02: * $Id: TransportServiceDescriptor.java 10961 2008-02-22 19:01:02Z dfeist $
03: * --------------------------------------------------------------------------------------
04: * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
05: *
06: * The software in this package is published under the terms of the CPAL v1.0
07: * license, a copy of which has been included with this distribution in the
08: * LICENSE.txt file.
09: */
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: public MessageAdapter createMessageAdapter(Object message)
39: throws TransportServiceException;
40:
41: public SessionHandler createSessionHandler()
42: throws TransportServiceException;
43:
44: public MessageReceiver createMessageReceiver(Connector connector,
45: Service service, InboundEndpoint endpoint)
46: throws MuleException;
47:
48: public MessageReceiver createMessageReceiver(Connector connector,
49: Service service, InboundEndpoint endpoint, Object[] args)
50: throws MuleException;
51:
52: public MessageDispatcherFactory createDispatcherFactory()
53: throws TransportServiceException;
54:
55: public MessageRequesterFactory createRequesterFactory()
56: throws TransportServiceException;
57:
58: public TransactionFactory createTransactionFactory()
59: throws TransportServiceException;
60:
61: public Connector createConnector() throws TransportServiceException;
62:
63: public List createInboundTransformers()
64: throws TransportFactoryException;
65:
66: public List createOutboundTransformers()
67: throws TransportFactoryException;
68:
69: public List createResponseTransformers()
70: throws TransportFactoryException;
71:
72: public EndpointURIBuilder createEndpointBuilder()
73: throws TransportFactoryException;
74:
75: public void setExceptionMappings(Properties props);
76:
77: public Properties getExceptionMappings();
78:
79: }
|