Package org.jboss.hal.dmr.dispatch
Class Dispatcher
- java.lang.Object
-
- org.jboss.hal.dmr.dispatch.Dispatcher
-
- All Implemented Interfaces:
com.google.gwt.event.shared.EventHandler,RecordingEvent.RecordingHandler
public class Dispatcher extends Object implements RecordingEvent.RecordingHandler
Executes operations against the management endpoint.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceDispatcher.ErrorCallbackstatic classDispatcher.HttpMethodstatic classDispatcher.ResponseStatus
-
Constructor Summary
Constructors Constructor Description Dispatcher(Environment environment, Endpoints endpoints, Settings settings, com.google.web.bindery.event.shared.EventBus eventBus, ResponseHeadersProcessors responseHeadersProcessors, Macros macros, Resources resources)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description elemental2.promise.Promise<ModelNode>dmr(Operation operation)Executes the operation and upon successful result, returns the response results, but doesn't retrieve the "result" payload as the other execute methods does.voiddmr(Operation operation, Consumer<ModelNode> success, Dispatcher.ErrorCallback errorCallback)Executes the operation and upon successful result, calls the success function with the response results, but doesn't retrieve the "result" payload as the other execute methods does.voiddownload(Operation operation, Consumer<String> success)StringdownloadUrl(Operation operation)elemental2.promise.Promise<CompositeResult>execute(Composite operations)voidexecute(Composite operations, Consumer<CompositeResult> success)voidexecute(Composite operations, Consumer<CompositeResult> success, Dispatcher.ErrorCallback errorCallback)elemental2.promise.Promise<ModelNode>execute(Operation operation)voidexecute(Operation operation, Consumer<ModelNode> success)voidexecute(Operation operation, Consumer<ModelNode> success, Dispatcher.ErrorCallback errorCallback)Dispatcher.ErrorCallbackgetDefaultErrorCallback()voidonRecording(RecordingEvent event)elemental2.promise.Promise<ModelNode>upload(elemental2.dom.FileList files, Operation operation)elemental2.promise.Promise<ModelNode>upload(elemental2.dom.File file, Operation operation)
-
-
-
Constructor Detail
-
Dispatcher
@Inject public Dispatcher(Environment environment, Endpoints endpoints, Settings settings, com.google.web.bindery.event.shared.EventBus eventBus, ResponseHeadersProcessors responseHeadersProcessors, Macros macros, Resources resources)
-
-
Method Detail
-
getDefaultErrorCallback
public Dispatcher.ErrorCallback getDefaultErrorCallback()
-
execute
public void execute(Composite operations, Consumer<CompositeResult> success)
-
execute
public void execute(Composite operations, Consumer<CompositeResult> success, Dispatcher.ErrorCallback errorCallback)
-
execute
public elemental2.promise.Promise<CompositeResult> execute(Composite operations)
-
execute
public void execute(Operation operation, Consumer<ModelNode> success, Dispatcher.ErrorCallback errorCallback)
-
dmr
public void dmr(Operation operation, Consumer<ModelNode> success, Dispatcher.ErrorCallback errorCallback)
Executes the operation and upon successful result, calls the success function with the response results, but doesn't retrieve the "result" payload as the other execute methods does. You should use this method if the response node you want is not in the "result" attribute.
-
dmr
public elemental2.promise.Promise<ModelNode> dmr(Operation operation)
Executes the operation and upon successful result, returns the response results, but doesn't retrieve the "result" payload as the other execute methods does. You should use this method if the response node you want is not in the "result" attribute.
-
upload
public elemental2.promise.Promise<ModelNode> upload(elemental2.dom.FileList files, Operation operation)
-
upload
public elemental2.promise.Promise<ModelNode> upload(elemental2.dom.File file, Operation operation)
-
onRecording
public void onRecording(RecordingEvent event)
- Specified by:
onRecordingin interfaceRecordingEvent.RecordingHandler
-
-