Skip navigation links

Oracle® On Track Communication SDK Documentation
Release 1(1.0)

E20955-01


waggle.core.api
Interface XAPI


public interface XAPI

Interface to facilitate API calls from the client to the server.


Field Summary
static String API_HEADER_ACCEPT_ENCODING
          RFC2616 Accept-Encoding header.
static String API_HEADER_ACCEPT_LANGUAGE
          RFC2616 Accept-Language header.
static String API_HEADER_ACCEPT_RANGES
          RFC2616 Accept-Ranges header.
static String API_HEADER_API_VERSION
          The HTTP Header for API Version.
static String API_HEADER_AUTHORIZATION
          RFC2616 Authorization header.
static String API_HEADER_BC_MESSAGES
          The HTTP Header for number of back channel messages sent as a result of the request.
static String API_HEADER_BC_SERIAL
          The HTTP Header for a back channel Serial Number.
static String API_HEADER_BC_YIELD
          The HTTP Header for back channel Yield in milliseconds.
static String API_HEADER_CLIENT_ID
          The HTTP Header for Client ID.
static String API_HEADER_CONTENT_DURATION
          RFC2616 X-Content-Duration header.
static String API_HEADER_CONTENT_RANGE
          RFC2616 Content-Range header.
static String API_HEADER_CORS_ACCESS_CONTROL_ALLOW_CREDENTIALS
          W3C CORS Access Control Allow Credentials header.
static String API_HEADER_CORS_ACCESS_CONTROL_ALLOW_HEADERS
          W3C CORS Access Control Allow Headers header.
static String API_HEADER_CORS_ACCESS_CONTROL_ALLOW_METHODS
          W3C CORS Access Control Allow Methods header.
static String API_HEADER_CORS_ACCESS_CONTROL_ALLOW_ORIGIN
          W3C CORS Access Control Allow Origin header.
static String API_HEADER_CORS_ACCESS_CONTROL_EXPOSE_HEADERS
          W3C CORS Access Control Expose Headers header.
static String API_HEADER_CORS_ACCESS_CONTROL_MAX_AGE
          W3C CORS Access Control Max Age header.
static String API_HEADER_CORS_ACCESS_CONTROL_REQUEST_HEADERS
          W3C CORS Access Control Request Headers header.
static String API_HEADER_CORS_ACCESS_CONTROL_REQUEST_METHOD
          W3C CORS Access Control Request Method header.
static String API_HEADER_CORS_ORIGIN
          W3C CORS Origin header.
static String API_HEADER_IF_MODIFIED_SINCE
          RFC2616 If-Modified-Since header.
static String API_HEADER_ONTRACK_AGENT
          The HTTP Header for On Track Agent (client program) identifier.
static String API_HEADER_RANDOM_ID
          The HTTP Header for a Random ID.
static String API_HEADER_RANGE
          RFC2616 Range header.
static String API_HEADER_TICKET_ID
          The HTTP Header for Ticket ID.
static String API_HEADER_TIME_ZONE
          The HTTP Header for the user's TimeZone.
static String API_HEADER_WINDOW_ID
          The HTTP Header for a Random ID.
static String API_PARAMETER_BC_SERIAL
          The HTTP Parameter for a back channel Serial Number.
static String API_PARAMETER_CLIENT_ID
          The HTTP Parameter for Client ID.
static String API_PARAMETER_ONTRACK_AGENT
          The HTTP Parameter for On Track Agent (client program) identifier.
static String API_PARAMETER_RANDOM_ID
          The HTTP Parameter for a Random ID.
static String API_PARAMETER_TICKET_ID
          The HTTP Parameter for Ticket ID.
static String API_PARAMETER_WINDOW_ID
          The HTTP Parameter for a Window ID.
static int API_VERSION
          The current server API and feature set version.
static String API_VERSION_STRING
          What is the current server API version as a string.
static String MESSAGES_ELEMENT_NAME
          What is the element name for a response to a message queue call.
static String METHOD_GET
          HTTP GET method.
static String METHOD_OPTIONS
          HTTP OPTIONS method.
static String METHOD_POST
          HTTP POST method.
static String REQUEST_ELEMENT_NAME
          What is the element name for a request in a remote call.
static String RESPONSE_ELEMENT_NAME
          What is the element name for a response to a remote call.

 

Method Summary
<T extends XAPIInterface.Server>
T
call(Class<T> interfaceClass)
          Creates an XAPIInterface Proxy object to actually call an XAPIInterface method.
 String getAcceptEncoding()
          Return the Accept-Encoding header value being used.
 String getAcceptLanguage()
          Return the Accept-Language header value being used.
 XClientID getClientID()
          Return the Client ID being used.
 String getContext()
          Get the context name.
 List<XHTTPHeader> getHeaders()
          Return all the defined header values (AcceptEncoding, ClientID, etc.) in a list.
 String getRandomID()
          Return the Random ID being used.
 XHTTPSession getSession()
          Get the XHTTPSession.
 TimeZone getTimeZone()
          Return the X-OnTrack-TimeZone header value being used.
 void setAcceptEncoding(String acceptEncoding)
          Set the Accept-Encoding header value being used.
 void setAcceptLanguage(String acceptLanguage)
          Set the Accept-Language header value being used.
 void setClientID(long clientID)
          Set the Client ID to be used.
 void setClientID(XClientID clientID)
          Set the Client ID to be used.
 void setOnTrackAgent(String onTrackAgent)
          Set the On Track Agent to be used.
 void setProtocolXML(boolean protocolXML)
          Set the Protocol to be used.
 void setRandomID(String randomID)
          Set the Random ID to be used.
 void setSession(String host, String context)
          Create an HTTP Session for the specified host and path.
 void setSession(String host, String context, String proxyHost, int proxyPort)
          Create an HTTP Session for the specified host and path using the specified proxy host and port.
 void setTimeZone(TimeZone timeZone)
          Set the X-OnTrack-TimeZone header value being used.

 

Field Detail

METHOD_OPTIONS

static final String METHOD_OPTIONS
HTTP OPTIONS method.
See Also:
Constant Field Values

METHOD_GET

static final String METHOD_GET
HTTP GET method.
See Also:
Constant Field Values

METHOD_POST

static final String METHOD_POST
HTTP POST method.
See Also:
Constant Field Values

API_HEADER_ACCEPT_ENCODING

static final String API_HEADER_ACCEPT_ENCODING
RFC2616 Accept-Encoding header.
See Also:
Constant Field Values

API_HEADER_ACCEPT_LANGUAGE

static final String API_HEADER_ACCEPT_LANGUAGE
RFC2616 Accept-Language header.
See Also:
Constant Field Values

API_HEADER_RANGE

static final String API_HEADER_RANGE
RFC2616 Range header.
See Also:
Constant Field Values

API_HEADER_ACCEPT_RANGES

static final String API_HEADER_ACCEPT_RANGES
RFC2616 Accept-Ranges header.
See Also:
Constant Field Values

API_HEADER_CONTENT_RANGE

static final String API_HEADER_CONTENT_RANGE
RFC2616 Content-Range header.
See Also:
Constant Field Values

API_HEADER_CONTENT_DURATION

static final String API_HEADER_CONTENT_DURATION
RFC2616 X-Content-Duration header.
See Also:
Constant Field Values

API_HEADER_AUTHORIZATION

static final String API_HEADER_AUTHORIZATION
RFC2616 Authorization header.
See Also:
Constant Field Values

API_HEADER_CORS_ACCESS_CONTROL_ALLOW_CREDENTIALS

static final String API_HEADER_CORS_ACCESS_CONTROL_ALLOW_CREDENTIALS
W3C CORS Access Control Allow Credentials header.

See http://www.w3.org/TR/cors/.

See Also:
Constant Field Values

API_HEADER_CORS_ACCESS_CONTROL_ALLOW_HEADERS

static final String API_HEADER_CORS_ACCESS_CONTROL_ALLOW_HEADERS
W3C CORS Access Control Allow Headers header.

See http://www.w3.org/TR/cors/.

See Also:
Constant Field Values

API_HEADER_CORS_ACCESS_CONTROL_ALLOW_METHODS

static final String API_HEADER_CORS_ACCESS_CONTROL_ALLOW_METHODS
W3C CORS Access Control Allow Methods header.

See http://www.w3.org/TR/cors/.

See Also:
Constant Field Values

API_HEADER_CORS_ACCESS_CONTROL_ALLOW_ORIGIN

static final String API_HEADER_CORS_ACCESS_CONTROL_ALLOW_ORIGIN
W3C CORS Access Control Allow Origin header.

See http://www.w3.org/TR/cors/.

See Also:
Constant Field Values

API_HEADER_CORS_ACCESS_CONTROL_EXPOSE_HEADERS

static final String API_HEADER_CORS_ACCESS_CONTROL_EXPOSE_HEADERS
W3C CORS Access Control Expose Headers header.

See http://www.w3.org/TR/cors/.

See Also:
Constant Field Values

API_HEADER_CORS_ACCESS_CONTROL_MAX_AGE

static final String API_HEADER_CORS_ACCESS_CONTROL_MAX_AGE
W3C CORS Access Control Max Age header.

See http://www.w3.org/TR/cors/.

See Also:
Constant Field Values

API_HEADER_CORS_ACCESS_CONTROL_REQUEST_HEADERS

static final String API_HEADER_CORS_ACCESS_CONTROL_REQUEST_HEADERS
W3C CORS Access Control Request Headers header.

See http://www.w3.org/TR/cors/.

See Also:
Constant Field Values

API_HEADER_CORS_ACCESS_CONTROL_REQUEST_METHOD

static final String API_HEADER_CORS_ACCESS_CONTROL_REQUEST_METHOD
W3C CORS Access Control Request Method header.

See http://www.w3.org/TR/cors/.

See Also:
Constant Field Values

API_HEADER_CORS_ORIGIN

static final String API_HEADER_CORS_ORIGIN
W3C CORS Origin header.

See http://www.w3.org/TR/cors/.

See Also:
Constant Field Values

API_HEADER_IF_MODIFIED_SINCE

static final String API_HEADER_IF_MODIFIED_SINCE
RFC2616 If-Modified-Since header.
See Also:
Constant Field Values

API_HEADER_ONTRACK_AGENT

static final String API_HEADER_ONTRACK_AGENT
The HTTP Header for On Track Agent (client program) identifier.
See Also:
Constant Field Values

API_PARAMETER_ONTRACK_AGENT

static final String API_PARAMETER_ONTRACK_AGENT
The HTTP Parameter for On Track Agent (client program) identifier.
See Also:
Constant Field Values

API_HEADER_API_VERSION

static final String API_HEADER_API_VERSION
The HTTP Header for API Version.
See Also:
Constant Field Values

API_HEADER_TIME_ZONE

static final String API_HEADER_TIME_ZONE
The HTTP Header for the user's TimeZone.
See Also:
Constant Field Values

API_HEADER_BC_SERIAL

static final String API_HEADER_BC_SERIAL
The HTTP Header for a back channel Serial Number.
See Also:
Constant Field Values

API_PARAMETER_BC_SERIAL

static final String API_PARAMETER_BC_SERIAL
The HTTP Parameter for a back channel Serial Number.
See Also:
Constant Field Values

API_HEADER_BC_YIELD

static final String API_HEADER_BC_YIELD
The HTTP Header for back channel Yield in milliseconds. This is an HTTP response header.
See Also:
Constant Field Values

API_HEADER_CLIENT_ID

static final String API_HEADER_CLIENT_ID
The HTTP Header for Client ID.
See Also:
Constant Field Values

API_PARAMETER_CLIENT_ID

static final String API_PARAMETER_CLIENT_ID
The HTTP Parameter for Client ID.
See Also:
Constant Field Values

API_HEADER_TICKET_ID

static final String API_HEADER_TICKET_ID
The HTTP Header for Ticket ID.
See Also:
Constant Field Values

API_PARAMETER_TICKET_ID

static final String API_PARAMETER_TICKET_ID
The HTTP Parameter for Ticket ID.
See Also:
Constant Field Values

API_HEADER_RANDOM_ID

static final String API_HEADER_RANDOM_ID
The HTTP Header for a Random ID.
See Also:
Constant Field Values

API_PARAMETER_RANDOM_ID

static final String API_PARAMETER_RANDOM_ID
The HTTP Parameter for a Random ID.
See Also:
Constant Field Values

API_HEADER_WINDOW_ID

static final String API_HEADER_WINDOW_ID
The HTTP Header for a Random ID.
See Also:
Constant Field Values

API_PARAMETER_WINDOW_ID

static final String API_PARAMETER_WINDOW_ID
The HTTP Parameter for a Window ID.
See Also:
Constant Field Values

API_HEADER_BC_MESSAGES

static final String API_HEADER_BC_MESSAGES
The HTTP Header for number of back channel messages sent as a result of the request. This is an HTTP response header.
See Also:
Constant Field Values

API_VERSION

static final int API_VERSION
The current server API and feature set version.

This value MUST be incremented if there are significant changes to the API and feature set.

This value must be specified in an 'X-OnTrack-APIVersion' header for all API calls except for any login and getLoginInfo() calls.

Clients are informed of this value in the XLoginInfo returned in response to either an login() or getLoginInfo() call. The client must use the value returned in the XLoginInfo field APIVersion in the appropriate headers.

The client should change it's behaviour to conform to the API and feature set at the version specified. If the client cannot conform to the API and feature set at the specified version it should not communicate with the server.

See Also:
Constant Field Values

API_VERSION_STRING

static final String API_VERSION_STRING
What is the current server API version as a string.

REQUEST_ELEMENT_NAME

static final String REQUEST_ELEMENT_NAME
What is the element name for a request in a remote call.
See Also:
Constant Field Values

RESPONSE_ELEMENT_NAME

static final String RESPONSE_ELEMENT_NAME
What is the element name for a response to a remote call.
See Also:
Constant Field Values

MESSAGES_ELEMENT_NAME

static final String MESSAGES_ELEMENT_NAME
What is the element name for a response to a message queue call.
See Also:
Constant Field Values

Method Detail

setSession

void setSession(String host,
                String context)
Create an HTTP Session for the specified host and path.
Parameters:
host - The host.
context - The context.

setSession

void setSession(String host,
                String context,
                String proxyHost,
                int proxyPort)
Create an HTTP Session for the specified host and path using the specified proxy host and port.
Parameters:
host - The host.
context - The context.
proxyHost - The proxy host to use if not null.
proxyPort - The proxy port.

getSession

XHTTPSession getSession()
Get the XHTTPSession.
Returns:
The HTTPSession.

getContext

String getContext()
Get the context name.
Returns:
The context name.

getClientID

XClientID getClientID()
Return the Client ID being used.
Returns:
The Client ID being used.

setClientID

void setClientID(XClientID clientID)
Set the Client ID to be used.
Parameters:
clientID - The Client ID to be used.

setClientID

void setClientID(long clientID)
Set the Client ID to be used.
Parameters:
clientID - The Client ID to be used.

getRandomID

String getRandomID()
Return the Random ID being used.
Returns:
The Random ID being used.

setRandomID

void setRandomID(String randomID)
Set the Random ID to be used.
Parameters:
randomID - The Random ID to be used.

setOnTrackAgent

void setOnTrackAgent(String onTrackAgent)
Set the On Track Agent to be used. This sets the X-OnTrack-Agent header.
Parameters:
onTrackAgent - The On Track Agent to be used.

getAcceptLanguage

String getAcceptLanguage()
Return the Accept-Language header value being used. For example, "en-GB". Follow the RFC-2616 format for the header value format and use two-letter language and country codes from ISO-639 and ISO-3166, respectively.
Returns:
The Accept-Language header value being used.

setAcceptLanguage

void setAcceptLanguage(String acceptLanguage)
Set the Accept-Language header value being used.
Parameters:
acceptLanguage - The Accept-Language header value being used.

getAcceptEncoding

String getAcceptEncoding()
Return the Accept-Encoding header value being used.
Returns:
The Accept-Encoding header value being used.

setAcceptEncoding

void setAcceptEncoding(String acceptEncoding)
Set the Accept-Encoding header value being used.
Parameters:
acceptEncoding - The Accept-Encoding header value being used.

getTimeZone

TimeZone getTimeZone()
Return the X-OnTrack-TimeZone header value being used.
Returns:
The X-OnTrack-TimeZone header value being used.

setTimeZone

void setTimeZone(TimeZone timeZone)
Set the X-OnTrack-TimeZone header value being used.
Parameters:
timeZone - The X-OnTrack-TimeZone header value to use.

getHeaders

List<XHTTPHeader> getHeaders()
Return all the defined header values (AcceptEncoding, ClientID, etc.) in a list.
Returns:
a list containing all the defined header values

setProtocolXML

void setProtocolXML(boolean protocolXML)
Set the Protocol to be used.
Parameters:
protocolXML - Set true for XML and set false for JSON.

call

<T extends XAPIInterface.Server> T call(Class<T> interfaceClass)
Creates an XAPIInterface Proxy object to actually call an XAPIInterface method. Uses the default XHTTPSession. Used by a client to call server methods.
Type Parameters:
T - The server interface class.
Parameters:
interfaceClass - The server interface.
Returns:
The method's return value.

Skip navigation links

Oracle® On Track Communication SDK Documentation
Release 1(1.0)

E20955-01


Copyright © 2011, Oracle and/or its affiliates. All rights reserved.