Interface TerminalTransport
- All Known Implementing Classes:
HttpTerminalTransport
public interface TerminalTransport
How a network terminal reaches its provider: one HTTP exchange.
HttpTerminalTransport is the default and goes through Codename One's
network stack. Supply another to route requests through your own server
(so the credential never ships in the app), to add tracing, or to script
a test.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TerminalTransport.CallbackReceives the outcome of onesend(String, String, Map, String, String, TerminalTransport.Callback). -
Method Summary
-
Field Details
-
IGNORE
Receives the outcome of onesend(String, String, Map, String, String, TerminalTransport.Callback). A callback that ignores the answer: for a request whose outcome some other request reports, such as a cancel.
-
-
Method Details
-
send
void send(String method, String url, Map<String, String> headers, String contentType, String body, TerminalTransport.Callback callback) Performs one request. Exactly one of the callback's methods must be called, on the EDT.
Parameters
-
method:GETorPOST -
url: the absolute URL -
headers: request headers; may be empty, never null -
contentType: the body's content type, or null for a bodiless request -
body: the request body, or null -
callback: receives the outcome
-
-