KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mule > providers > oracle > jms > OracleJmsMessageDispatcher


1 /*
2  * $Id: OracleJmsMessageDispatcher.java 3798 2006-11-04 04:07:14Z aperepel $
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 MuleSource MPL
7  * license, a copy of which has been included with this distribution in the
8  * LICENSE.txt file.
9  */

10
11 package org.mule.providers.oracle.jms;
12
13 import org.mule.providers.jms.JmsConnector;
14 import org.mule.providers.jms.JmsMessageDispatcher;
15 import org.mule.umo.UMOMessage;
16 import org.mule.umo.endpoint.UMOImmutableEndpoint;
17
18 /**
19  * @author <a HREF="mailto:carlson@hotpop.com">Travis Carlson</a>
20  */

21 public class OracleJmsMessageDispatcher extends JmsMessageDispatcher
22 {
23
24     public OracleJmsMessageDispatcher(UMOImmutableEndpoint endpoint)
25     {
26         super(endpoint);
27     }
28
29     /**
30      * Make a specific request to the underlying transport Save a copy of the
31      * endpoint's properties within the OracleJmsSupport object.
32      *
33      * @see OracleJmsSupport#endpointProperties
34      * @param endpoint the endpoint to use when connecting to the resource
35      * @param timeout the maximum time the operation should block before returning.
36      * The call should return immediately if there is data available. If
37      * no data becomes available before the timeout elapses, null will be
38      * returned
39      * @return the result of the request wrapped in a UMOMessage object. Null will be
40      * returned if no data was avaialable
41      * @throws Exception if the call to the underlying protocal cuases an exception
42      */

43     protected UMOMessage doReceive(UMOImmutableEndpoint endpoint, long timeout) throws Exception JavaDoc
44     {
45         ((OracleJmsSupport)((JmsConnector)getConnector()).getJmsSupport()).setEndpointProperties(endpoint.getEndpointURI()
46             .getParams());
47         return super.doReceive(endpoint, timeout);
48     }
49 }
50
Popular Tags