Skip to content

Commit

Permalink
Remove old style remoting
Browse files Browse the repository at this point in the history
  • Loading branch information
nickebbutt committed Apr 20, 2018
1 parent 2eccac8 commit 0dd772a
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import org.chorusbdd.chorus.remoting.jmx.ChorusHandlerJmxExporter;

import java.util.function.Function;
import java.util.function.UnaryOperator;
import java.util.regex.Pattern;

/**
Expand All @@ -40,7 +40,7 @@ public static void main(String[] args) throws Exception {
String calcName = args[0];

//change the steps exported according to the name of the calc process we have started
Function<Pattern, Pattern> patternFunction = pattern -> Pattern.compile(pattern.pattern() + " in " + calcName);
UnaryOperator<Pattern> patternFunction = pattern -> Pattern.compile(pattern.pattern() + " in " + calcName);

new ChorusHandlerJmxExporter(patternFunction, new CalculatorHandler()).export();
Thread.sleep(1000 * 60 * 5); //keeps process alive for 5 mins
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.chorusbdd.chorus.remoting.jmx.ChorusHandlerJmxExporter;

import java.util.function.Function;
import java.util.function.UnaryOperator;
import java.util.regex.Pattern;

/**
Expand All @@ -43,7 +44,7 @@ public static void main(String[] args) throws Exception {
String calcName = args[0];

//change the steps exported according to the name of the calc process we have started
Function<Pattern, Pattern> patternFunction = pattern -> Pattern.compile(pattern.pattern() + " in " + calcName);
UnaryOperator<Pattern> patternFunction = pattern -> Pattern.compile(pattern.pattern() + " in " + calcName);

//export calculator handlers
new ChorusHandlerJmxExporter(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public void aClientCanPublishAStepAndAServerCanExecuteIt() {
"testPublisher",
"step1",
UUID.randomUUID().toString(),
UUID.randomUUID().toString(),
"call a test step",
30,
Collections.emptyList(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.chorusbdd.chorus.remoting.jmx.ChorusHandlerJmxExporter;

import java.util.function.Function;
import java.util.function.UnaryOperator;
import java.util.regex.Pattern;

/**
Expand All @@ -40,7 +41,7 @@ public static void main(String[] args) throws InterruptedException {
StoreLastResultHandler handler = new StoreLastResultHandler();

//add a suffix so we can separate remote steps from local invocations of the handler
Function<Pattern, Pattern> patternFunction = pattern -> Pattern.compile(pattern.pattern() + " in storelastremote");
UnaryOperator<Pattern> patternFunction = pattern -> Pattern.compile(pattern.pattern() + " in storelastremote");

ChorusHandlerJmxExporter exporter = new ChorusHandlerJmxExporter(patternFunction, handler);
exporter.export();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
/**
* MIT License
*
* Copyright (c) 2018 Chorus BDD Organisation.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.chorusbdd.chorus.stepinvoker.util;

import org.chorusbdd.chorus.stepinvoker.StepInvoker;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
/**
* MIT License
*
* Copyright (c) 2018 Chorus BDD Organisation.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.chorusbdd.chorus.stepinvoker.util;

import org.chorusbdd.chorus.stepinvoker.StepInvoker;
Expand Down

0 comments on commit 0dd772a

Please sign in to comment.