Skip navigation links

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

E20955-01


waggle.core.api
Class XAPIManager

java.lang.Object
  extended by waggle.core.api.XAPIManager


public final class XAPIManager
extends Object

Manager class for the XAPI interface.


Field Summary
static String ENABLE_SELF_SIGNED_CERTIFICATES
          Property name to enable self signed certificates.

 

Method Summary
static
<T extends XAPIInterface.Server>
T
call(Class<T> interfaceClass)
          Perform a local or remote API call using the XAPI singleton.
static XAPI getInstance()
          Get the XAPI singleton.
static XHTTPSession getSession()
          Get the Session for the XAPI singleton.
static XAPI newInstance()
          Get a new XAPI instance to be used for a separate session in say another thread.
static void setAcceptEncoding(String acceptEncoding)
          Set the Accept-Encoding header for the XAPI singleton.
static void setAcceptLanguage(String acceptLanguage)
          Set the Accept-Language header for the XAPI singleton.
static void setClientID(long clientID)
          Set the Client ID for the XAPI singleton.
static void setClientID(XClientID clientID)
          Set the Client ID for the XAPI singleton.
static void setOnTrackAgent(String onTrackAgent)
          Set the On Track Agent for the XAPI singleton.
static void setProtocolXML(boolean protocolXML)
          Set the Protocol for the XAPI singleton to XML.
static void setRandomID(String randomID)
          Set the Random ID for the XAPI singleton.
static void setSession(String host, String context)
          Set the HTTP Session for the specified host and context for the XAPI singleton.
static void setSession(String host, String context, String proxyHost, int proxyPort)
          Set the HTTP Session for the specified host and context using the specified proxy host and port for the XAPI singleton.
static void setTimeZone(TimeZone timeZone)
          Set the time zone header for the XAPI singleton.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

ENABLE_SELF_SIGNED_CERTIFICATES

public static final String ENABLE_SELF_SIGNED_CERTIFICATES
Property name to enable self signed certificates.
See Also:
Constant Field Values

Method Detail

getInstance

public static XAPI getInstance()
Get the XAPI singleton.
Returns:
The XAPI singleton.

newInstance

public static XAPI newInstance()
Get a new XAPI instance to be used for a separate session in say another thread.
Returns:
The new XAPI instance to be used for a separate session in say another thread.

setSession

public static void setSession(String host,
                              String context)
Set the HTTP Session for the specified host and context for the XAPI singleton.
Parameters:
host - The host.
context - The context.

setSession

public static void setSession(String host,
                              String context,
                              String proxyHost,
                              int proxyPort)
Set the HTTP Session for the specified host and context using the specified proxy host and port for the XAPI singleton.
Parameters:
host - The host.
context - The context.
proxyHost - The proxy host.
proxyPort - The proxy port.

getSession

public static XHTTPSession getSession()
Get the Session for the XAPI singleton.
Returns:
The Session for the XAPI singleton.

setProtocolXML

public static void setProtocolXML(boolean protocolXML)
Set the Protocol for the XAPI singleton to XML.
Parameters:
protocolXML - Set true for XML and set false for JSON.

setClientID

public static void setClientID(XClientID clientID)
Set the Client ID for the XAPI singleton.
Parameters:
clientID - The Client ID.

setClientID

public static void setClientID(long clientID)
Set the Client ID for the XAPI singleton.
Parameters:
clientID - The Client ID for the XAPI singleton.

setRandomID

public static void setRandomID(String randomID)
Set the Random ID for the XAPI singleton.
Parameters:
randomID - The random ID for the XAPI singleton.

setOnTrackAgent

public static void setOnTrackAgent(String onTrackAgent)
Set the On Track Agent for the XAPI singleton.
Parameters:
onTrackAgent - The On Track Agent for the XAPI singleton.

setAcceptLanguage

public static void setAcceptLanguage(String acceptLanguage)
Set the Accept-Language header for the XAPI singleton.
Parameters:
acceptLanguage - The Accept-Language header for the XAPI singleton.

setAcceptEncoding

public static void setAcceptEncoding(String acceptEncoding)
Set the Accept-Encoding header for the XAPI singleton.
Parameters:
acceptEncoding - The Accept-Encoding header for the XAPI singleton.

setTimeZone

public static void setTimeZone(TimeZone timeZone)
Set the time zone header for the XAPI singleton.
Parameters:
timeZone - The time zone header for the XAPI singleton.

call

public static <T extends XAPIInterface.Server> T call(Class<T> interfaceClass)
Perform a local or remote API call using the XAPI singleton. Clients use this method to call a server method and get a response. Server can use this method to call server methods (locally) and get a response.
Type Parameters:
T - The server interface class.
Parameters:
interfaceClass - The server API interface.
Returns:
An instance of the specified XAPIInterface.Server which can be used to call a server method and get a response.

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.