Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow the abstract text publisher to be configured to publish to many…
… different sources.
- Loading branch information
Showing
3 changed files
with
32 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
symmetric/src/main/java/org/jumpmind/symmetric/ext/IPublisher.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package org.jumpmind.symmetric.ext; | ||
|
||
public interface IPublisher { | ||
public void publish(String text); | ||
} |
17 changes: 17 additions & 0 deletions
17
symmetric/src/main/java/org/jumpmind/symmetric/ext/SimpleJmsPublisher.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package org.jumpmind.symmetric.ext; | ||
|
||
import org.springframework.jms.core.JmsTemplate; | ||
|
||
public class SimpleJmsPublisher implements IPublisher { | ||
|
||
JmsTemplate jmsTemplate; | ||
|
||
public void publish(String text) { | ||
jmsTemplate.convertAndSend(text); | ||
} | ||
|
||
public void setJmsTemplate(JmsTemplate jmsTemplate) { | ||
this.jmsTemplate = jmsTemplate; | ||
} | ||
|
||
} |