23 lines
482 B
Java
23 lines
482 B
Java
void configure(String mediator, String from, String to) throws Exception {
|
|
FileMessageBoard.publish(
|
|
"mediators/" + mediator + "/inbox",
|
|
new Message("ROUTE", from + "\n" + to)
|
|
);
|
|
}
|
|
|
|
void main() throws Exception {
|
|
configure(
|
|
"mediator1",
|
|
"consoleIn/outbox",
|
|
"rot13/inbox"
|
|
);
|
|
|
|
configure(
|
|
"mediator2",
|
|
"rot13/outbox",
|
|
"consoleOut/inbox"
|
|
);
|
|
|
|
IO.println("Configured mediator1 and mediator2");
|
|
}
|