Reformating configuration and examples for PDF (Scala, and leftovers). See #2413
This commit is contained in:
parent
309bb53d98
commit
08ef942242
46 changed files with 330 additions and 191 deletions
|
|
@ -6,7 +6,8 @@ public class HttpSample {
|
|||
public static void main(String[] args) {
|
||||
//#HttpExample
|
||||
// Create the actors. this can be done in a Boot class so you can
|
||||
// run the example in the MicroKernel. just add the below three lines to your boot class.
|
||||
// run the example in the MicroKernel. just add the three lines to below
|
||||
// your boot class.
|
||||
ActorSystem system = ActorSystem.create("some-system");
|
||||
final ActorRef httpTransformer = system.actorOf(new Props(HttpTransformer.class));
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@ public class HttpTransformer extends UntypedActor{
|
|||
public void onReceive(Object message) {
|
||||
if (message instanceof CamelMessage) {
|
||||
CamelMessage camelMessage = (CamelMessage) message;
|
||||
CamelMessage replacedMessage = camelMessage.mapBody(new Mapper<Object, String>(){
|
||||
CamelMessage replacedMessage =
|
||||
camelMessage.mapBody(new Mapper<Object, String>(){
|
||||
@Override
|
||||
public String apply(Object body) {
|
||||
String text = new String((byte[])body);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue