Package org.webappos.webcaller
Interface IWebCaller
-
public interface IWebCallerUsed by the server-side bridge and server-side web calls actions to make web calls.- Author:
- Sergejs Kozlovics
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classIWebCaller.CallingConventionsSpecifies the calling convention for web calls.static classIWebCaller.WebCallDeclarationA class for storing one parsed web call declaration from some .webcalls file.static classIWebCaller.WebCallSeedA class for storing all necessary information required to make a web call.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidenqueue(IWebCaller.WebCallSeed seed)Enqueues a web call.intgetQueueSize(java.lang.String project_id)Returns how many web calls have been enqueued for the given project (including the web call currently being executed).IWebCaller.WebCallDeclarationgetWebCallDeclaration(java.lang.String actionName)Obtain a parsed web call declaration loaded from some .webcalls file.java.util.Map<java.lang.String,IWebCaller.WebCallDeclaration>getWebCalls(java.lang.String fullAppName)Obtain all legitimate web calls that can be used within the given webAppOS app.booleaninvokeNow(IWebCaller.WebCallSeed seed)Tries to invoke the given web call in the current web processor, bypassing the bridge.booleanwebCallExists(java.lang.String actionName)Checks whether the given web call action exists.
-
-
-
Method Detail
-
getQueueSize
int getQueueSize(java.lang.String project_id)
Returns how many web calls have been enqueued for the given project (including the web call currently being executed).- Parameters:
project_id- the project id to check- Returns:
- whether the length of the queue
-
enqueue
void enqueue(IWebCaller.WebCallSeed seed)
Enqueues a web call.- Parameters:
seed- the information required to make a web call
-
invokeNow
boolean invokeNow(IWebCaller.WebCallSeed seed)
Tries to invoke the given web call in the current web processor, bypassing the bridge.- Parameters:
seed- the information required to make a web call- Returns:
- whether the operation succeeded (i.e., the adapter found and the call was made)
-
webCallExists
boolean webCallExists(java.lang.String actionName)
Checks whether the given web call action exists.- Parameters:
actionName- web call action name to check- Returns:
- true, if the action was found, or false otherwise (also in case of an error)
-
getWebCallDeclaration
IWebCaller.WebCallDeclaration getWebCallDeclaration(java.lang.String actionName)
Obtain a parsed web call declaration loaded from some .webcalls file.- Parameters:
actionName- web call action name to consider- Returns:
- a parsed web call declaration
-
getWebCalls
java.util.Map<java.lang.String,IWebCaller.WebCallDeclaration> getWebCalls(java.lang.String fullAppName)
Obtain all legitimate web calls that can be used within the given webAppOS app. Useful for the client side to know what it can call.- Parameters:
fullAppName- the full app name (with the .app suffix)- Returns:
- a map: web call action name -> parsed web call declaration
-
-