change the type of the handler function, and go down the rabbit hole a bit. Add a Procedure2[T1,T2] to the Java API, and add JavaEventHandler that gives access from java to the EventHandler, add docs for configuring the handler in declarative Supervision for Scala and Java.
This commit is contained in:
parent
41ef2843b1
commit
b96eca5868
6 changed files with 100 additions and 6 deletions
|
|
@ -20,6 +20,12 @@ trait Procedure[T] {
|
|||
def apply(param: T): Unit
|
||||
}
|
||||
|
||||
/** A Procedure is like a Function, but it doesn't produce a return value
|
||||
*/
|
||||
trait Procedure2[T1,T2] {
|
||||
def apply(param: T1, param2:T2): Unit
|
||||
}
|
||||
|
||||
/**
|
||||
* An executable piece of code that takes no parameters and doesn't return any value.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue