Package io.toro.martini.gloop
Class GloopInvoker
- java.lang.Object
-
- io.toro.martini.gloop.GloopInvoker
-
public final class GloopInvoker extends Object
Provides extension methods for invoking Gloop services.
-
-
Constructor Summary
Constructors Constructor Description GloopInvoker()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static GloopModel
gloop(GloopModel input, GloopExecutionContext context, String name)
Runs a gloop service using itsname
with providedinput
.static GloopModel
gloop(GloopModel input, String name)
Runs a gloop service using itsname
with providedinput
, automatically creating an execution context.static GloopModel
gloop(String name, GloopExecutionContext context, Object... inputs)
Runs a gloop service using itsname
with providedinputs
.static GloopModel
gloop(String name, GloopExecutionContext context, Map inputs)
Runs a gloop service using itsname
with providedinputs
.static GloopModel
gloop(String name, GloopModel input)
Runs a gloop service using itsname
with providedinput
, automatically creating an execution context.static GloopModel
gloop(String name, Object... inputs)
Runs a gloop service using itsname
with providedinputs
, automatically creating an execution context.static GloopModel
gloop(String name, Collection inputs)
Runs a gloop service using itsname
with providedinputs
, automatically creating an execution context.static GloopModel
gloop(String name, Map inputs)
Runs a gloop service using itsname
with providedinputs
, automatically creating an execution context.
-
-
-
Method Detail
-
gloop
public static GloopModel gloop(String name, Object... inputs) throws GloopException
Runs a gloop service using itsname
with providedinputs
, automatically creating an execution context.- Parameters:
name
- name of the gloop serviceinputs
- the inputs to be passed to the gloop service, following the order defined on the service- Returns:
- output of the gloop service
- Throws:
GloopException
-
gloop
public static GloopModel gloop(String name, Collection inputs) throws GloopException
Runs a gloop service using itsname
with providedinputs
, automatically creating an execution context.- Parameters:
name
- name of the gloop serviceinputs
- the inputs to be passed to the gloop service, following the order defined on the service- Returns:
- output of the gloop service
- Throws:
GloopException
-
gloop
public static GloopModel gloop(String name, Map inputs) throws GloopException
Runs a gloop service using itsname
with providedinputs
, automatically creating an execution context.- Parameters:
name
- name of the gloop serviceinputs
- the inputs to be passed to the gloop service- Returns:
- output of the gloop service
- Throws:
GloopException
-
gloop
public static GloopModel gloop(String name, GloopModel input) throws GloopException
Runs a gloop service using itsname
with providedinput
, automatically creating an execution context.- Parameters:
name
- name of the gloop serviceinput
- model that contains the inputs to be passed to the gloop service (empty by default)- Returns:
- output of the gloop service
- Throws:
GloopException
-
gloop
public static GloopModel gloop(GloopModel input, String name) throws GloopException
Runs a gloop service using itsname
with providedinput
, automatically creating an execution context.- Parameters:
input
- model that contains the inputs to be passed to the gloop servicename
- name of the gloop service- Returns:
- output of the gloop service
- Throws:
GloopException
-
gloop
public static GloopModel gloop(String name, GloopExecutionContext context, Object... inputs) throws GloopException
Runs a gloop service using itsname
with providedinputs
. Note thatcontext
must be closed if there are any object that needs to be closed (e.g. database connections and cursors) or use sibling methods to automatically create and close the context.- Parameters:
name
- name of the gloop servicecontext
- execution context for the serviceinputs
- the inputs to be passed to the gloop service, following the order defined on the service- Returns:
- output of the gloop service
- Throws:
GloopException
-
gloop
public static GloopModel gloop(String name, GloopExecutionContext context, Map inputs) throws GloopException
Runs a gloop service using itsname
with providedinputs
. Note thatcontext
must be closed if there are any object that needs to be closed (e.g. database connections and cursors) or use sibling methods to automatically create and close the context.- Parameters:
name
- name of the gloop servicecontext
- execution context for the serviceinputs
- the inputs to be passed to the gloop service- Returns:
- output of the gloop service
- Throws:
GloopException
-
gloop
public static GloopModel gloop(GloopModel input, GloopExecutionContext context, String name) throws GloopException
Runs a gloop service using itsname
with providedinput
. Note thatcontext
must be closed if there are any object that needs to be closed (e.g. database connections and cursors) or use sibling methods to automatically create and close the context.- Parameters:
input
- model that contains the inputs to be passed to the gloop servicecontext
- execution context for the servicename
- name of the gloop service- Returns:
- output of the gloop service
- Throws:
GloopException
-
-