MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / execute

Method execute

src/plugins/sftp/src/com/foxdebug/sftp/Sftp.java:63–88  ·  view source on GitHub ↗
(
    String action,
    JSONArray args,
    CallbackContext callback
  )

Source from the content-addressed store, hash-verified

61 }
62
63 public boolean execute(
64 String action,
65 JSONArray args,
66 CallbackContext callback
67 ) {
68 try {
69 Method method = getClass()
70 .getDeclaredMethod(action, JSONArray.class, CallbackContext.class);
71
72 if (method != null) {
73 method.invoke(this, args, callback);
74 return true;
75 }
76 } catch (NoSuchMethodException e) {
77 callback.error("Method not found: " + action);
78 return false;
79 } catch (SecurityException e) {
80 callback.error("Security exception: " + e.getMessage());
81 return false;
82 } catch (Exception e) {
83 callback.error("Exception: " + e.getMessage());
84 return false;
85 }
86
87 return false;
88 }
89
90 public void connectUsingPassword(JSONArray args, CallbackContext callback) {
91 cordova

Callers 14

connectUsingPasswordMethod · 0.45
connectUsingKeyFileMethod · 0.45
execMethod · 0.45
getFileMethod · 0.45
putFileMethod · 0.45
lsDirMethod · 0.45
statMethod · 0.45
mkdirMethod · 0.45
rmMethod · 0.45
createFileMethod · 0.45
renameMethod · 0.45
pwdMethod · 0.45

Calls 1

errorMethod · 0.45

Tested by

no test coverage detected