Skip to content

Commit

Permalink
INT-3147 Doc Polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
garyrussell committed Nov 4, 2013
1 parent c734ae5 commit 1c92c61
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 21 deletions.
Expand Up @@ -25,10 +25,9 @@
<xsd:attribute name="id" type="xsd:string" use="required">
<xsd:annotation>
<xsd:documentation>
Plays a role:
- a bean id of Polling Endpoint;
- with suffix '.source' a bean id of MessageSource;
- represent a MetaDataStore key with suffix '.' + feedUrl - The URL for an RSS or ATOM feed.
The bean id of this Polling Endpoint; the MessageSource is also registered with this id
plus a suffix '.source'; also used as the
MetaDataStore key with suffix '.' + feedUrl - The URL for an RSS or ATOM feed.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
Expand All @@ -40,7 +39,7 @@
</tool:annotation>
</xsd:appinfo>
<xsd:documentation>
Identifies channel attached to this adapter, where messages will be sent to by this adapter.
Identifies the channel attached to this adapter, to which messages will be sent.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
Expand Down
Expand Up @@ -126,10 +126,9 @@
<xsd:attribute name="id" type="xsd:string" use="required">
<xsd:annotation>
<xsd:documentation>
Plays a role:
- a bean id of Polling Endpoint;
- with suffix '.source' a bean id of MessageSource;
- represent a MetaDataStore key with suffix '.' + profileId from authorized Twitter user.
The bean id of this Polling Endpoint; the MessageSource is also registered with this id
plus a suffix '.source'; also used as the
MetaDataStore key with suffix '.' + feedUrl - The URL for an RSS or ATOM feed.

This comment has been minimized.

Copy link
@artembilan

artembilan Nov 4, 2013

Here it is a twitter, not feed. So should be changed respectively
Thanks

This comment has been minimized.

Copy link
@garyrussell

garyrussell Nov 4, 2013

Author Owner

oops

</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
Expand All @@ -141,7 +140,7 @@
</tool:annotation>
</xsd:appinfo>
<xsd:documentation>
Identifies channel attached to this adapter, where messages will be sent to by this adapter.
Identifies the channel the attached to this adapter, to which messages will be sent.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
Expand Down
6 changes: 3 additions & 3 deletions src/reference/docbook/feed.xml
Expand Up @@ -108,9 +108,9 @@ xsi:schemaLocation="http://www.springframework.org/schema/integration/feed
and configure it as bean in the Application Context.
</para>
<note>
The key used to persist the latest <emphasis>published date</emphasis> is the value of required
<code>id</code> attribute of Feed Inbound Channel Adapter component plus <code>feedUrl</code>
from adapter configuration.
The key used to persist the latest <emphasis>published date</emphasis> is the value of the (required)
<code>id</code> attribute of the Feed Inbound Channel Adapter component plus the <code>feedUrl</code>
from the adapter's configuration.
</note>
</section>
</chapter>
17 changes: 9 additions & 8 deletions src/reference/docbook/twitter.xml
Expand Up @@ -141,11 +141,12 @@ twitter.oauth.accessTokenSecret=AbRxUAvyNCtqQtxFK8w5ZMtMj20KFhB6o]]></programlis
criteria you'll end up with the same set of tweets unless some other new tweet that matches your search criteria was posted
in between your searches. In that situation you'll get all the tweets you had before plus the new one. But what you really
want is only the new tweet(s). Spring Integration provides an elegant mechanism for handling these situations.
The latest Tweet timestamp will be stored in an instance of the <classname>org.springframework.integration.metadata.MetadataStore</classname> which is a
The latest Tweet id will be stored in an instance of the <classname>org.springframework.integration.metadata.MetadataStore</classname> which is a
strategy interface designed for storing various types of metadata (e.g., last retrieved tweet in this case). That strategy helps components such as
these Twitter adapters avoid duplicates. By default, Spring Integration will look for a bean of type
<classname>org.springframework.integration.metadata.MetadataStore</classname> in the ApplicationContext.
If one is found then it will be used, otherwise it will create a new instance of <classname>SimpleMetadataStore</classname>
<classname>org.springframework.integration.metadata.MetadataStore</classname> in the ApplicationContext. Alternatively,
you can configure an explicit <classname>MetadataStore</classname> on the adapter.
If there is no explicit or default store, the adapter will create a new instance of <classname>SimpleMetadataStore</classname>
which is a simple in-memory implementation that will only persist metadata within the lifecycle of the currently running application context.
That means upon restart you may end up with duplicate entries. If you need to persist metadata between Application Context
restarts, you may use the <classname>PropertiesPersistingMetadataStore</classname> (which is backed by a properties file, and a persister
Expand All @@ -166,13 +167,13 @@ twitter.oauth.accessTokenSecret=AbRxUAvyNCtqQtxFK8w5ZMtMj20KFhB6o]]></programlis
<programlisting language="xml"><![CDATA[<bean id="metadataStore" class="o.s.i.store.PropertiesPersistingMetadataStore"/>
]]></programlisting>
<para>
The Poller that is configured as part of any Inbound Twitter Adapter (see below)
will simply poll from this MetadataStore to determine the latest tweet received.
If the <classname>MetadataStore</classname> is persistent, during initialization, any Inbound Twitter Adapter (see below)
will retrieve the latest tweet id that has already been sent by the adapter.
</para>
<note>
The key used to persist the latest <emphasis>published date</emphasis> is the value of required
<code>id</code> attribute of Twitter Inbound Channel Adapter component plus <code>profileId</code>
from authorized Twitter user.
The key used to persist the latest <emphasis>twitter id</emphasis> is the value of the (required)
<code>id</code> attribute of the Twitter Inbound Channel Adapter component plus the <code>profileId</code>
of the Twitter user.
</note>

<section id="inbound-twitter-update">
Expand Down

1 comment on commit 1c92c61

@artembilan
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything other is OK

Please sign in to comment.