View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.module.jca;
8   
9   import org.mule.api.MuleException;
10  import org.mule.api.MuleMessage;
11  
12  import java.util.Map;
13  
14  import javax.resource.ResourceException;
15  
16  /**
17   * <code>MuleConnection</code> defines the client connection methods for the JCA
18   * CCI contract
19   */
20  public interface MuleConnection
21  {
22      void dispatch(String url, Object payload, Map messageProperties) throws MuleException;
23  
24      MuleMessage request(String url, long timeout) throws MuleException;
25  
26      MuleManagedConnection getManagedConnection();
27  
28      void close() throws ResourceException;
29  
30      void associateConnection(MuleManagedConnection newMc) throws ResourceException;
31  
32      MuleMessage send(String url, Object payload, Map messageProperties) throws MuleException;
33  }