blob: 59273c3600bee145c9146adaa21c9e1bf90cb498 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JmsSpout (Storm 1.0.6 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="JmsSpout (Storm 1.0.6 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/JmsSpout.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/storm/jms/spout/JmsMessageID.html" title="class in org.apache.storm.jms.spout"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li>Next&nbsp;Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/storm/jms/spout/JmsSpout.html" target="_top">Frames</a></li>
<li><a href="JmsSpout.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.storm.jms.spout</div>
<h2 title="Class JmsSpout" class="title">Class JmsSpout</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/storm/topology/base/BaseComponent.html" title="class in org.apache.storm.topology.base">org.apache.storm.topology.base.BaseComponent</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/storm/topology/base/BaseRichSpout.html" title="class in org.apache.storm.topology.base">org.apache.storm.topology.base.BaseRichSpout</a></li>
<li>
<ul class="inheritance">
<li>org.apache.storm.jms.spout.JmsSpout</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, javax.jms.MessageListener, <a href="../../../../../org/apache/storm/spout/ISpout.html" title="interface in org.apache.storm.spout">ISpout</a>, <a href="../../../../../org/apache/storm/topology/IComponent.html" title="interface in org.apache.storm.topology">IComponent</a>, <a href="../../../../../org/apache/storm/topology/IRichSpout.html" title="interface in org.apache.storm.topology">IRichSpout</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">JmsSpout</span>
extends <a href="../../../../../org/apache/storm/topology/base/BaseRichSpout.html" title="class in org.apache.storm.topology.base">BaseRichSpout</a>
implements javax.jms.MessageListener</pre>
<div class="block"><p>A Storm <code>Spout</code> implementation that listens to a JMS topic or queue and outputs tuples based on the messages it receives. <p> <code>JmsSpout</code> instances rely on <code>JmsProducer</code> implementations to obtain the JMS <code>ConnectionFactory</code> and <code>Destination</code> objects necessary to connect to a JMS topic/queue. <p> When a <code>JmsSpout</code> receives a JMS message, it delegates to an internal <code>JmsTupleProducer</code> instance to create a Storm tuple from the incoming message. <p> Typically, developers will supply a custom <code>JmsTupleProducer</code> implementation appropriate for the expected message content.</p></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../serialized-form.html#org.apache.storm.jms.spout.JmsSpout">Serialized Form</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/storm/jms/spout/JmsSpout.html#recoveryMutex">recoveryMutex</a></span></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/storm/jms/spout/JmsSpout.html#JmsSpout--">JmsSpout</a></span>()</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/storm/jms/spout/JmsSpout.html#ack-java.lang.Object-">ack</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;msgId)</code>
<div class="block">Storm has determined that the tuple emitted by this spout with the msgId identifier has been fully processed.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/storm/jms/spout/JmsSpout.html#close--">close</a></span>()</code>
<div class="block">Called when an ISpout is going to be shutdown.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/storm/jms/spout/JmsSpout.html#declareOutputFields-org.apache.storm.topology.OutputFieldsDeclarer-">declareOutputFields</a></span>(<a href="../../../../../org/apache/storm/topology/OutputFieldsDeclarer.html" title="interface in org.apache.storm.topology">OutputFieldsDeclarer</a>&nbsp;declarer)</code>
<div class="block">Declare the output schema for all the streams of this topology.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/storm/jms/spout/JmsSpout.html#fail-java.lang.Object-">fail</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;msgId)</code>
<div class="block">The tuple emitted by this spout with the msgId identifier has failed to be fully processed.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/storm/jms/spout/JmsSpout.html#getJmsAcknowledgeMode--">getJmsAcknowledgeMode</a></span>()</code>
<div class="block">Returns the JMS Session acknowledgement mode for the JMS seesion associated with this spout.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>protected javax.jms.Session</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/storm/jms/spout/JmsSpout.html#getSession--">getSession</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/storm/jms/spout/JmsSpout.html#hasFailures--">hasFailures</a></span>()</code>
<div class="block">Returns <code>true</code> if the spout has received failures from which it has not yet recovered.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/storm/jms/spout/JmsSpout.html#isDistributed--">isDistributed</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/storm/jms/spout/JmsSpout.html#nextTuple--">nextTuple</a></span>()</code>
<div class="block">When this method is called, Storm is requesting that the Spout emit tuples to the output collector.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/storm/jms/spout/JmsSpout.html#onMessage-javax.jms.Message-">onMessage</a></span>(javax.jms.Message&nbsp;msg)</code>
<div class="block"><code>javax.jms.MessageListener</code> implementation.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/storm/jms/spout/JmsSpout.html#open-java.util.Map-org.apache.storm.task.TopologyContext-org.apache.storm.spout.SpoutOutputCollector-">open</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&nbsp;conf,
<a href="../../../../../org/apache/storm/task/TopologyContext.html" title="class in org.apache.storm.task">TopologyContext</a>&nbsp;context,
<a href="../../../../../org/apache/storm/spout/SpoutOutputCollector.html" title="class in org.apache.storm.spout">SpoutOutputCollector</a>&nbsp;collector)</code>
<div class="block"><code>ISpout</code> implementation.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/storm/jms/spout/JmsSpout.html#recovered--">recovered</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/storm/jms/spout/JmsSpout.html#setDistributed-boolean-">setDistributed</a></span>(boolean&nbsp;distributed)</code>
<div class="block">Sets the &ldquo;distributed&rdquo; mode of this spout.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/storm/jms/spout/JmsSpout.html#setJmsAcknowledgeMode-int-">setJmsAcknowledgeMode</a></span>(int&nbsp;mode)</code>
<div class="block">Sets the JMS Session acknowledgement mode for the JMS seesion associated with this spout.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/storm/jms/spout/JmsSpout.html#setJmsProvider-org.apache.storm.jms.JmsProvider-">setJmsProvider</a></span>(<a href="../../../../../org/apache/storm/jms/JmsProvider.html" title="interface in org.apache.storm.jms">JmsProvider</a>&nbsp;provider)</code>
<div class="block">Set the <code>JmsProvider</code> implementation that this Spout will use to connect to a JMS <code>javax.jms.Desination</code></div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/storm/jms/spout/JmsSpout.html#setJmsTupleProducer-org.apache.storm.jms.JmsTupleProducer-">setJmsTupleProducer</a></span>(<a href="../../../../../org/apache/storm/jms/JmsTupleProducer.html" title="interface in org.apache.storm.jms">JmsTupleProducer</a>&nbsp;producer)</code>
<div class="block">Set the <code>JmsTupleProducer</code> implementation that will convert <code>javax.jms.Message</code> object to <code>org.apache.storm.tuple.Values</code> objects to be emitted.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/storm/jms/spout/JmsSpout.html#setRecoveryPeriod-long-">setRecoveryPeriod</a></span>(long&nbsp;period)</code>
<div class="block">Sets the periodicity of the timer task that checks for failures and recovers the JMS session.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.storm.topology.base.BaseRichSpout">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.storm.topology.base.<a href="../../../../../org/apache/storm/topology/base/BaseRichSpout.html" title="class in org.apache.storm.topology.base">BaseRichSpout</a></h3>
<code><a href="../../../../../org/apache/storm/topology/base/BaseRichSpout.html#activate--">activate</a>, <a href="../../../../../org/apache/storm/topology/base/BaseRichSpout.html#deactivate--">deactivate</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.storm.topology.base.BaseComponent">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.storm.topology.base.<a href="../../../../../org/apache/storm/topology/base/BaseComponent.html" title="class in org.apache.storm.topology.base">BaseComponent</a></h3>
<code><a href="../../../../../org/apache/storm/topology/base/BaseComponent.html#getComponentConfiguration--">getComponentConfiguration</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.storm.topology.IComponent">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.apache.storm.topology.<a href="../../../../../org/apache/storm/topology/IComponent.html" title="interface in org.apache.storm.topology">IComponent</a></h3>
<code><a href="../../../../../org/apache/storm/topology/IComponent.html#getComponentConfiguration--">getComponentConfiguration</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="recoveryMutex">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>recoveryMutex</h4>
<pre>public final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a> recoveryMutex</pre>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="JmsSpout--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>JmsSpout</h4>
<pre>public&nbsp;JmsSpout()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="setJmsAcknowledgeMode-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setJmsAcknowledgeMode</h4>
<pre>public&nbsp;void&nbsp;setJmsAcknowledgeMode(int&nbsp;mode)</pre>
<div class="block"><p>Sets the JMS Session acknowledgement mode for the JMS seesion associated with this spout. <p> Possible values: <ul> <li>javax.jms.Session.AUTO_ACKNOWLEDGE</li> <li>javax.jms.Session.CLIENT_ACKNOWLEDGE</li> <li>javax.jms.Session.DUPS_OK_ACKNOWLEDGE</li> </ul></p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mode</code> - JMS Session Acknowledgement mode</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the mode is not recognized.</dd>
</dl>
</li>
</ul>
<a name="getJmsAcknowledgeMode--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getJmsAcknowledgeMode</h4>
<pre>public&nbsp;int&nbsp;getJmsAcknowledgeMode()</pre>
<div class="block"><p>Returns the JMS Session acknowledgement mode for the JMS seesion associated with this spout.</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
</dl>
</li>
</ul>
<a name="setJmsProvider-org.apache.storm.jms.JmsProvider-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setJmsProvider</h4>
<pre>public&nbsp;void&nbsp;setJmsProvider(<a href="../../../../../org/apache/storm/jms/JmsProvider.html" title="interface in org.apache.storm.jms">JmsProvider</a>&nbsp;provider)</pre>
<div class="block"><p>Set the <code>JmsProvider</code> implementation that this Spout will use to connect to a JMS <code>javax.jms.Desination</code></p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>provider</code> - </dd>
</dl>
</li>
</ul>
<a name="setJmsTupleProducer-org.apache.storm.jms.JmsTupleProducer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setJmsTupleProducer</h4>
<pre>public&nbsp;void&nbsp;setJmsTupleProducer(<a href="../../../../../org/apache/storm/jms/JmsTupleProducer.html" title="interface in org.apache.storm.jms">JmsTupleProducer</a>&nbsp;producer)</pre>
<div class="block"><p>Set the <code>JmsTupleProducer</code> implementation that will convert <code>javax.jms.Message</code> object to <code>org.apache.storm.tuple.Values</code> objects to be emitted.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>producer</code> - </dd>
</dl>
</li>
</ul>
<a name="onMessage-javax.jms.Message-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onMessage</h4>
<pre>public&nbsp;void&nbsp;onMessage(javax.jms.Message&nbsp;msg)</pre>
<div class="block"><p><code>javax.jms.MessageListener</code> implementation. <p> Stored the JMS message in an internal queue for processing by the <code>nextTuple()</code> method.</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>onMessage</code>&nbsp;in interface&nbsp;<code>javax.jms.MessageListener</code></dd>
</dl>
</li>
</ul>
<a name="open-java.util.Map-org.apache.storm.task.TopologyContext-org.apache.storm.spout.SpoutOutputCollector-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>open</h4>
<pre>public&nbsp;void&nbsp;open(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&nbsp;conf,
<a href="../../../../../org/apache/storm/task/TopologyContext.html" title="class in org.apache.storm.task">TopologyContext</a>&nbsp;context,
<a href="../../../../../org/apache/storm/spout/SpoutOutputCollector.html" title="class in org.apache.storm.spout">SpoutOutputCollector</a>&nbsp;collector)</pre>
<div class="block"><p><code>ISpout</code> implementation. <p> Connects the JMS spout to the configured JMS destination topic/queue.</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/storm/spout/ISpout.html#open-java.util.Map-org.apache.storm.task.TopologyContext-org.apache.storm.spout.SpoutOutputCollector-">open</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/storm/spout/ISpout.html" title="interface in org.apache.storm.spout">ISpout</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>conf</code> - The Storm configuration for this spout. This is the configuration provided to the topology merged in with cluster configuration on this machine.</dd>
<dd><code>context</code> - This object can be used to get information about this task&rsquo;s place within the topology, including the task id and component id of this task, input and output information, etc.</dd>
<dd><code>collector</code> - The collector is used to emit tuples from this spout. Tuples can be emitted at any time, including the open and close methods. The collector is thread-safe and should be saved as an instance variable of this spout object.</dd>
</dl>
</li>
</ul>
<a name="close--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>public&nbsp;void&nbsp;close()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/storm/spout/ISpout.html#close--">ISpout</a></code></span></div>
<div class="block"><p>Called when an ISpout is going to be shutdown. There is no guarentee that close will be called, because the supervisor kill -9&rsquo;s worker processes on the cluster.</p><p>The one context where close is guaranteed to be called is a topology is killed when running Storm in local mode.</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/storm/spout/ISpout.html#close--">close</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/storm/spout/ISpout.html" title="interface in org.apache.storm.spout">ISpout</a></code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../../org/apache/storm/topology/base/BaseRichSpout.html#close--">close</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/storm/topology/base/BaseRichSpout.html" title="class in org.apache.storm.topology.base">BaseRichSpout</a></code></dd>
</dl>
</li>
</ul>
<a name="nextTuple--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nextTuple</h4>
<pre>public&nbsp;void&nbsp;nextTuple()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/storm/spout/ISpout.html#nextTuple--">ISpout</a></code></span></div>
<div class="block"><p>When this method is called, Storm is requesting that the Spout emit tuples to the output collector. This method should be non-blocking, so if the Spout has no tuples to emit, this method should return. nextTuple, ack, and fail are all called in a tight loop in a single thread in the spout task. When there are no tuples to emit, it is courteous to have nextTuple sleep for a short amount of time (like a single millisecond) so as not to waste too much CPU.</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/storm/spout/ISpout.html#nextTuple--">nextTuple</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/storm/spout/ISpout.html" title="interface in org.apache.storm.spout">ISpout</a></code></dd>
</dl>
</li>
</ul>
<a name="ack-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ack</h4>
<pre>public&nbsp;void&nbsp;ack(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;msgId)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/storm/spout/ISpout.html#ack-java.lang.Object-">ISpout</a></code></span></div>
<div class="block"><p>Storm has determined that the tuple emitted by this spout with the msgId identifier has been fully processed. Typically, an implementation of this method will take that message off the queue and prevent it from being replayed.</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/storm/spout/ISpout.html#ack-java.lang.Object-">ack</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/storm/spout/ISpout.html" title="interface in org.apache.storm.spout">ISpout</a></code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../../org/apache/storm/topology/base/BaseRichSpout.html#ack-java.lang.Object-">ack</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/storm/topology/base/BaseRichSpout.html" title="class in org.apache.storm.topology.base">BaseRichSpout</a></code></dd>
</dl>
</li>
</ul>
<a name="fail-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fail</h4>
<pre>public&nbsp;void&nbsp;fail(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;msgId)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/storm/spout/ISpout.html#fail-java.lang.Object-">ISpout</a></code></span></div>
<div class="block"><p>The tuple emitted by this spout with the msgId identifier has failed to be fully processed. Typically, an implementation of this method will put that message back on the queue to be replayed at a later time.</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/storm/spout/ISpout.html#fail-java.lang.Object-">fail</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/storm/spout/ISpout.html" title="interface in org.apache.storm.spout">ISpout</a></code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../../org/apache/storm/topology/base/BaseRichSpout.html#fail-java.lang.Object-">fail</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/storm/topology/base/BaseRichSpout.html" title="class in org.apache.storm.topology.base">BaseRichSpout</a></code></dd>
</dl>
</li>
</ul>
<a name="declareOutputFields-org.apache.storm.topology.OutputFieldsDeclarer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>declareOutputFields</h4>
<pre>public&nbsp;void&nbsp;declareOutputFields(<a href="../../../../../org/apache/storm/topology/OutputFieldsDeclarer.html" title="interface in org.apache.storm.topology">OutputFieldsDeclarer</a>&nbsp;declarer)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/storm/topology/IComponent.html#declareOutputFields-org.apache.storm.topology.OutputFieldsDeclarer-">IComponent</a></code></span></div>
<div class="block"><p>Declare the output schema for all the streams of this topology.</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/storm/topology/IComponent.html#declareOutputFields-org.apache.storm.topology.OutputFieldsDeclarer-">declareOutputFields</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/storm/topology/IComponent.html" title="interface in org.apache.storm.topology">IComponent</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>declarer</code> - this is used to declare output stream ids, output fields, and whether or not each output stream is a direct stream</dd>
</dl>
</li>
</ul>
<a name="hasFailures--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasFailures</h4>
<pre>public&nbsp;boolean&nbsp;hasFailures()</pre>
<div class="block"><p>Returns <code>true</code> if the spout has received failures from which it has not yet recovered.</p></div>
</li>
</ul>
<a name="recovered--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>recovered</h4>
<pre>protected&nbsp;void&nbsp;recovered()</pre>
</li>
</ul>
<a name="setRecoveryPeriod-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setRecoveryPeriod</h4>
<pre>public&nbsp;void&nbsp;setRecoveryPeriod(long&nbsp;period)</pre>
<div class="block"><p>Sets the periodicity of the timer task that checks for failures and recovers the JMS session.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>period</code> - </dd>
</dl>
</li>
</ul>
<a name="isDistributed--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isDistributed</h4>
<pre>public&nbsp;boolean&nbsp;isDistributed()</pre>
</li>
</ul>
<a name="setDistributed-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDistributed</h4>
<pre>public&nbsp;void&nbsp;setDistributed(boolean&nbsp;distributed)</pre>
<div class="block"><p>Sets the &ldquo;distributed&rdquo; mode of this spout. <p> If <code>true</code> multiple instances of this spout <i>may</i> be created across the cluster (depending on the &ldquo;parallelism_hint&rdquo; in the topology configuration). <p> Setting this value to <code>false</code> essentially means this spout will run as a singleton within the cluster (&ldquo;parallelism_hint&rdquo; will be ignored). <p> In general, this should be set to <code>false</code> if the underlying JMS destination is a topic, and <code>true</code> if it is a JMS queue.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>distributed</code> - </dd>
</dl>
</li>
</ul>
<a name="getSession--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getSession</h4>
<pre>protected&nbsp;javax.jms.Session&nbsp;getSession()</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/JmsSpout.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><script type="text/javascript" src="../../../../../highlight.pack.js"></script>
<script type="text/javascript"><!--
hljs.initHighlightingOnLoad();
//--></script></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/storm/jms/spout/JmsMessageID.html" title="class in org.apache.storm.jms.spout"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li>Next&nbsp;Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/storm/jms/spout/JmsSpout.html" target="_top">Frames</a></li>
<li><a href="JmsSpout.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2018 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</small></p>
</body>
</html>