Fix various typos in the code & docs
This commit is contained in:
@@ -62,7 +62,7 @@ This is a good place to get started. The samples here are technically motivated
|
||||
* **mongodb** - Shows how to persist a Message payload to a **MongoDb** document store and how to read documents from **MongoDb**
|
||||
* **oddeven** - Example combining the functionality of **Inbound Channel Adapter**, **Filter**, **Router** and **Poller**
|
||||
* **jpa** - This sample illustrates how the JPA Components can be used
|
||||
* **quote** - Example demoing core EIP support using **Channel Adapter (Inbound and Stdout)**, **Poller** with Interval Trigers, **Service Activator**
|
||||
* **quote** - Example demoing core EIP support using **Channel Adapter (Inbound and Stdout)**, **Poller** with Interval Triggers, **Service Activator**
|
||||
* **sftp** - Demonstrating SFTP support using **SFTP Inbound / Outbound Channel Adapters**
|
||||
* **tcp-amqp** - Demonstrates basic functionality of bridging the **Spring Integration TCP Adapters** with **Spring Integration AMQP Adapters**
|
||||
* **tcp-broadcast** - Demonstrates broadcasting a message to multiple connected TCP clients.
|
||||
|
||||
@@ -24,8 +24,8 @@ To run this configuration, start an instance of ActiveMQ with the openwire/TCP c
|
||||
1. **CafeDemoAppBaristaColdActiveMQ - starts the ColdDrink Barista
|
||||
2. **CafeDemoAppBaristaHotActiveMQ - starts the HotDrink Barista
|
||||
3. **CafeDemoAppOperationsActiveMQ - starts the Cafe Operations (order splitter, drink router, etc).
|
||||
4. **CafeDemoAppAcitveMQ - places the orders
|
||||
4. **CafeDemoAppActiveMQ - places the orders
|
||||
|
||||
### JMS backed components
|
||||
|
||||
See **CafeDemoActiveMQBackedChannels** for an example of how to use the JMS-backed channels. No need to start an external ActiveMQ because one is started internally
|
||||
See **CafeDemoActiveMQBackedChannels** for an example of how to use the JMS-backed channels. No need to start an external ActiveMQ because one is started internally
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
<!--After we've converted the orders to json, we send it on its way through a JMS outbound
|
||||
channel adapter. This is a one-way fire and forget approach. The processing will continue
|
||||
on the otherside of the JMS queue to which the channel adapter is connected -->
|
||||
on the other side of the JMS queue to which the channel adapter is connected -->
|
||||
<bean id="cafeOrdersQueue" class="org.apache.activemq.command.ActiveMQQueue">
|
||||
<constructor-arg value="org.springframework.integration.samples.cafe.orders"/>
|
||||
</bean>
|
||||
|
||||
@@ -33,7 +33,7 @@ public class CafeDemoAppUtilities {
|
||||
/**
|
||||
*
|
||||
* @param path path to the file
|
||||
* @param targetClass the class who's classloader we will use to laod the context file
|
||||
* @param targetClass the class who's classloader we will use to load the context file
|
||||
* @param profile a profile name
|
||||
* @return the spring context
|
||||
*/
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
- `marks` filters on EOF marker (drops SOF)
|
||||
- pubsub [flush files], [ftp (x3)], [email result]
|
||||
- Exceptions go to `tfrErrors` - sends failure email
|
||||
- input file is renamed, based on final dispostion
|
||||
- input file is renamed, based on final disposition
|
||||
|
||||
Test cases are provided for happy path and failure scenarios
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public interface UserService {
|
||||
|
||||
/**
|
||||
* Retrieves a user based on the provided username that is provided as a Map
|
||||
* entry using the mapkey 'username'. Map object is routed to the
|
||||
* entry using the key 'username'. Map object is routed to the
|
||||
* "findUserWithMapChannel" channel.
|
||||
*/
|
||||
Map<String, Object> findUserWithUsernameInMap(Map<String, Object> userdata);
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.integration.samples.enricher.domain.User;
|
||||
public class UserServiceTest {
|
||||
|
||||
@Test
|
||||
public void testStartupOfSpringInegrationContext() throws Exception {
|
||||
public void testStartupOfSpringIntegrationContext() throws Exception {
|
||||
final ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"/META-INF/spring/integration/spring-integration-context.xml", UserServiceTest.class);
|
||||
Thread.sleep(2000);
|
||||
|
||||
@@ -33,7 +33,7 @@ public interface PersonService {
|
||||
/**
|
||||
* Creates a {@link Person} instance from the {@link Person} instance passed
|
||||
*
|
||||
* @param person created person instance, it will contain the generated primary key and the formated name
|
||||
* @param person created person instance, it will contain the generated primary key and the formatted name
|
||||
* @return The persisted Entity
|
||||
*/
|
||||
Person createPerson(Person person);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<int:channel id="receiveChannel" />
|
||||
<!-- replace 'userid and 'password' with the real values -->
|
||||
<int-mail:imap-idle-channel-adapter id="customAdapter"
|
||||
store-uri="imaps://[userid]:[pasword]@imap.gmail.com:993/inbox"
|
||||
store-uri="imaps://[userid]:[password]@imap.gmail.com:993/inbox"
|
||||
channel="receiveChannel"
|
||||
auto-startup="true"
|
||||
should-delete-messages="false"
|
||||
|
||||
@@ -5,7 +5,7 @@ Spring Integration - MongoDb Sample
|
||||
|
||||
The *MongoDb Outbound Channel Adapter* allows you to write the Message payload to a MongoDb document store. You can see the simplest configuration of the MongoDb Channel Adapter below:
|
||||
|
||||
<int-mongodb:outbound-channel-adapter id="deafultAdapter"/>
|
||||
<int-mongodb:outbound-channel-adapter id="defaultAdapter"/>
|
||||
|
||||
It will be initialized with the default instance of the **MongoDbFactory** (the default bean name is 'mongoDbFactory') otherwise you can provide its
|
||||
reference via **mongodb-factory** attribute.
|
||||
|
||||
@@ -32,9 +32,9 @@ public class MongoDbOutboundAdapterDemo {
|
||||
* @param args
|
||||
*/
|
||||
public static void main(String[] args) throws Exception {
|
||||
DemoUtils.prepareMongoFactory(); // will clean up MOngoDb
|
||||
DemoUtils.prepareMongoFactory(); // will clean up MongoDB
|
||||
new MongoDbOutboundAdapterDemo().runDefaultAdapter();
|
||||
// new MongoDbOutboundAdapterDemo().runAdapterWithConveter();
|
||||
// new MongoDbOutboundAdapterDemo().runAdapterWithConverter();
|
||||
}
|
||||
|
||||
public void runDefaultAdapter() throws Exception {
|
||||
@@ -43,13 +43,13 @@ public class MongoDbOutboundAdapterDemo {
|
||||
ClassPathXmlApplicationContext context =
|
||||
new ClassPathXmlApplicationContext("mongodb-out-config.xml", MongoDbOutboundAdapterDemo.class);
|
||||
|
||||
MessageChannel messageChannel = context.getBean("deafultAdapter", MessageChannel.class);
|
||||
MessageChannel messageChannel = context.getBean("defaultAdapter", MessageChannel.class);
|
||||
messageChannel.send(new GenericMessage<Person>(this.createPersonA()));
|
||||
messageChannel.send(new GenericMessage<Person>(this.createPersonB()));
|
||||
messageChannel.send(new GenericMessage<Person>(this.createPersonC()));
|
||||
}
|
||||
|
||||
public void runAdapterWithConveter() throws Exception {
|
||||
public void runAdapterWithConverter() throws Exception {
|
||||
|
||||
@SuppressWarnings("resource")
|
||||
ClassPathXmlApplicationContext context =
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
<mongo:db-factory id="mongoDbFactory" dbname="test"/>
|
||||
|
||||
<int-mongodb:outbound-channel-adapter id="deafultAdapter" />
|
||||
<int-mongodb:outbound-channel-adapter id="defaultAdapter" />
|
||||
|
||||
<int-mongodb:outbound-channel-adapter id="adapterWithConverter" mongo-converter="stringConverter"/>
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ NOTE: You can see that we are using *SpEL* via the **remote-filename-generator-e
|
||||
|
||||
## OUTBOUND GATEWAY
|
||||
|
||||
Run the **FtpOutoundGateway** sample as a JUnit test; it creates 2 files, retrieves and removes them over ftp. It cleans up by removing the retrieved files. The test assumes full access to the filesystem via **/tmp** where the test files are created. Requires **sshd** to be running on localhost.
|
||||
Run the **FtpOutboundGateway** sample as a JUnit test; it creates 2 files, retrieves and removes them over ftp. It cleans up by removing the retrieved files. The test assumes full access to the filesystem via **/tmp** where the test files are created. Requires **sshd** to be running on localhost.
|
||||
|
||||
This sample uses a property **private.keyfile** to point to the location of your private key. Requires setting of **user**, **private.keyfile** and, optionally, **passphrase** in **user.properties**.
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ public class TcpBroadcastApplication {
|
||||
}
|
||||
|
||||
/*
|
||||
* Wait for server to start listenng and start 5 clients.
|
||||
* Wait for server to start listening and start 5 clients.
|
||||
*/
|
||||
@Bean
|
||||
public ApplicationRunner runner(TaskExecutor exec, Broadcaster caster) {
|
||||
|
||||
@@ -75,8 +75,8 @@ public class CustomSerializerDeserializer implements Serializer<CustomOrder>, De
|
||||
byte[] senderName = object.getSender().getBytes();
|
||||
outputStream.write(senderName);
|
||||
|
||||
String lenghtPadded = pad(6, object.getMessage().length());
|
||||
byte[] length = lenghtPadded.getBytes();
|
||||
String lengthPadded = pad(6, object.getMessage().length());
|
||||
byte[] length = lengthPadded.getBytes();
|
||||
outputStream.write(length);
|
||||
|
||||
outputStream.write(object.getMessage().getBytes());
|
||||
|
||||
@@ -4,7 +4,7 @@ XMPP Sample
|
||||
This example was prepared for testing with [Google Talk][] and demonstrates the following aspects of the [Extensible Messaging and Presence Protocol][] (XMPP) support available with *Spring Integration*:
|
||||
|
||||
1. XMPP Inbound Channel Adapter - receive instant messages.
|
||||
2. XMPP Outboud Channel Adapter - send instant messages.
|
||||
2. XMPP Outbound Channel Adapter - send instant messages.
|
||||
|
||||
In order to run this sample you need to provide correct values in **xmpp.properties**.
|
||||
Everything there was already preset. The only 3 properties you need to provide values for are:
|
||||
@@ -19,4 +19,4 @@ To test **SendInstantMessageSample.java**, first log on to the account identifie
|
||||
To test **ReceiveInstantMessageSample.java**, first log on to the account identified via **send.to.user** property. Then run the demo. Now any instant messages sent to your account appear in the console.
|
||||
|
||||
[Google Talk]: https://www.google.com/talk/
|
||||
[Extensible Messaging and Presence Protocol]: https://en.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol
|
||||
[Extensible Messaging and Presence Protocol]: https://en.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol
|
||||
|
||||
@@ -48,7 +48,7 @@ This example is pure XML - it's a simple flow...
|
||||
|
||||
gateway -> transformer -> service-activator
|
||||
|
||||
The transformer concatentates the payload to itself (String), the service upper cases the payload. The result is returned to the gateway. "foo" becomes "FOOFOO".
|
||||
The transformer concatenates the payload to itself (String), the service upper cases the payload. The result is returned to the gateway. "foo" becomes "FOOFOO".
|
||||
|
||||
## BXMLAndPojo
|
||||
|
||||
@@ -79,4 +79,3 @@ This adds a recipient list router and sends a copy of the payload to an SMTP Ema
|
||||
## GIMAP
|
||||
|
||||
This is a separate application that demonstrates the DSL configuring an IMAP idle channel adapter, to receive emails sent by __FEmail__.
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ public final class EmailParserUtils {
|
||||
final List<EmailFragment> emailFragments) {
|
||||
|
||||
Assert.notNull(mailMessage, "The mail message to be parsed must not be null.");
|
||||
Assert.notNull(emailFragments, "The collection of emailfragments must not be null.");
|
||||
Assert.notNull(emailFragments, "The collection of email fragments must not be null.");
|
||||
|
||||
final Object content;
|
||||
final String subject;
|
||||
@@ -135,7 +135,7 @@ public final class EmailParserUtils {
|
||||
Assert.notNull(directory, "The directory must not be null.");
|
||||
Assert.notNull(multipart, "The multipart object to be parsed must not be null.");
|
||||
Assert.notNull(mailMessage, "The mail message to be parsed must not be null.");
|
||||
Assert.notNull(emailFragments, "The collection of emailfragments must not be null.");
|
||||
Assert.notNull(emailFragments, "The collection of email fragments must not be null.");
|
||||
|
||||
final int count;
|
||||
|
||||
@@ -189,7 +189,7 @@ public final class EmailParserUtils {
|
||||
}
|
||||
|
||||
if (Part.ATTACHMENT.equalsIgnoreCase(disposition)) {
|
||||
LOGGER.info(String.format("Handdling attachment '%s', type: '%s'", filename, contentType));
|
||||
LOGGER.info(String.format("Handling attachment '%s', type: '%s'", filename, contentType));
|
||||
}
|
||||
|
||||
final Object content;
|
||||
@@ -208,7 +208,7 @@ public final class EmailParserUtils {
|
||||
|
||||
if (Part.ATTACHMENT.equalsIgnoreCase(disposition)) {
|
||||
emailFragments.add(new EmailFragment(directory, i + "-" + filename, content));
|
||||
LOGGER.info(String.format("Handdling attachment '%s', type: '%s'", filename, contentType));
|
||||
LOGGER.info(String.format("Handling attachment '%s', type: '%s'", filename, contentType));
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
/**
|
||||
* This class demonstrates the use a Spring Integration jmx adadpers to receive
|
||||
* This class demonstrates the use a Spring Integration jmx adapters to receive
|
||||
* notifications, poll attributes, and invoke operations on a Remote JMX MBeanServer.
|
||||
*
|
||||
* @author Gary Russell
|
||||
|
||||
@@ -83,7 +83,7 @@ public class EmployeeSearchService {
|
||||
}
|
||||
catch (Exception e) {
|
||||
setReturnStatusAndMessage("1", "System Error", employeeList, responseHeaderMap);
|
||||
logger.error("System error occured :" + e);
|
||||
logger.error("System error occurred :" + e);
|
||||
}
|
||||
Message<EmployeeList> message = new GenericMessage<EmployeeList>(employeeList, responseHeaderMap);
|
||||
return message;
|
||||
@@ -109,5 +109,3 @@ public class EmployeeSearchService {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ You can observe the function of the advice by entering a number of messages over
|
||||
`FileTransferRenameAfterFailureDemo`
|
||||
|
||||
|
||||
These classes show how to configure expressions to be evaluated after either succes, or failure; the application context is defined in expression-advice-context-xml.
|
||||
These classes show how to configure expressions to be evaluated after either success, or failure; the application context is defined in expression-advice-context-xml.
|
||||
|
||||
It is a simulation of an application with a file inbound adapter -> ftp outbound adapter.
|
||||
|
||||
@@ -63,4 +63,4 @@ In both cases simply add a file ending with .txt in ${java.io.tmpdir}/adviceDemo
|
||||
|
||||
## Running the Demos
|
||||
|
||||
In each case, run the main method in each of the demonstration classes.
|
||||
In each case, run the main method in each of the demonstration classes.
|
||||
|
||||
@@ -87,7 +87,7 @@ public final class Main {
|
||||
String coffeeDescription = service.findCoffeeBeverage(Integer.valueOf(input));
|
||||
|
||||
System.out.println(String.format("Searched for '%s' - Found: '%s'.", input, coffeeDescription));
|
||||
System.out.print("To try again, please enter another coffee beaverage and press <enter>:\n\n");
|
||||
System.out.print("To try again, please enter another coffee beverage and press <enter>:\n\n");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
public class CoffeeServiceStartupTest {
|
||||
|
||||
@Test
|
||||
public void testStartupOfSpringInegrationContext() throws Exception{
|
||||
public void testStartupOfSpringIntegrationContext() throws Exception{
|
||||
final ApplicationContext context
|
||||
= new ClassPathXmlApplicationContext("/META-INF/spring/integration/spring-integration-context.xml",
|
||||
CoffeeServiceStartupTest.class);
|
||||
|
||||
@@ -75,7 +75,7 @@ public final class Main {
|
||||
while (!scanner.hasNext("q")) {
|
||||
String input = scanner.nextLine();
|
||||
|
||||
System.out.println("Converting String to Uppcase using Stored Procedure...");
|
||||
System.out.println("Converting String to Uppercase using Stored Procedure...");
|
||||
String inputUpperCase = service.convertToUpperCase(input);
|
||||
|
||||
System.out.println("Retrieving Numeric value via Sql Function...");
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.springframework.integration.service.StringConversionService;
|
||||
public class StringConversionServiceTest {
|
||||
|
||||
@Test
|
||||
public void testStartupOfSpringInegrationContext() throws Exception{
|
||||
public void testStartupOfSpringIntegrationContext() throws Exception{
|
||||
new ClassPathXmlApplicationContext("/META-INF/spring/integration/spring-integration-context.xml",
|
||||
StringConversionServiceTest.class);
|
||||
Thread.sleep(2000);
|
||||
|
||||
@@ -135,7 +135,7 @@ You should see the following output:
|
||||
2. Execute Sample 2 (Coffee Service)
|
||||
q. Quit the application
|
||||
|
||||
Select **Opion 1**.
|
||||
Select **Option 1**.
|
||||
|
||||
=========================================================
|
||||
|
||||
@@ -230,7 +230,7 @@ You should see the following output:
|
||||
2. Execute Sample 2 (Coffee Service)
|
||||
q. Quit the application
|
||||
|
||||
Select **Opion 2**.
|
||||
Select **Option 2**.
|
||||
|
||||
This should result in the following output:
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ public final class Main {
|
||||
while (!scanner.hasNext("q")) {
|
||||
String input = scanner.nextLine();
|
||||
|
||||
System.out.println("Converting String to Uppcase using Stored Procedure...");
|
||||
System.out.println("Converting String to Uppercase using Stored Procedure...");
|
||||
String inputUpperCase = service.convertToUpperCase(input);
|
||||
|
||||
System.out.println("Retrieving Numeric value via Sql Function...");
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.springframework.integration.service.StringConversionService;
|
||||
public class StringConversionServiceTest {
|
||||
|
||||
@Test
|
||||
public void testStartupOfSpringInegrationContext() throws Exception{
|
||||
public void testStartupOfSpringIntegrationContext() throws Exception{
|
||||
final ApplicationContext context
|
||||
= new ClassPathXmlApplicationContext("/META-INF/spring/integration/spring-integration-context.xml",
|
||||
StringConversionServiceTest.class);
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<int:transaction-synchronization-factory id="syncFactory">
|
||||
<int:after-commit expression="payload.renameTo(payload.absolutePath + '.SUCCEEDED') ? payload + ' renamed after success' : payload + 'failed to rename after success'"
|
||||
channel="infoLogger" />
|
||||
<int:after-rollback expression="payload.renameTo(payload.absolutePath + '.FAILED') ? payload + ' renamed after faiure' : payload + 'failed to rename after failure'"
|
||||
<int:after-rollback expression="payload.renameTo(payload.absolutePath + '.FAILED') ? payload + ' renamed after failure' : payload + 'failed to rename after failure'"
|
||||
channel="errorLogger" />
|
||||
</int:transaction-synchronization-factory>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user