com.ibm.rfid.premises.app.access
Class SensorEventsAPIContext

java.lang.Object
  extended by com.ibm.rfid.premises.app.access.SensorEventsAPIContext

public class SensorEventsAPIContext
extends java.lang.Object

A SensorEventsAPIContext is a class with static functions that are used to return a SensorEventsAPIAccess object. Specifically, this class will determine if a SensorEventsAPIAccessRemote (uses Web Services to access a IBM WebSphere Sensor Events Server)or a SensorEventsAPIAccessLocal (uses EJBs to access the IBM WebSphere Sensor Events on the local host).

See Also:
SensorEventsAPIAccess, SensorEventsAPIAccessLocal, SensorEventsAPIAccessRemote

Method Summary
static ALEAccess getALEAccess()
           
static ALEAccess getALEAccess(java.lang.String hostname, java.lang.String alePort)
           
static java.lang.String getAlePort()
          get port used for ALE web service access (default: 9080).
static java.lang.String getHostname()
           
static java.lang.String getPort()
          get port used for web service access (default: 9080).
static SensorEventsAPIAccess getSensorEventsAPIAccess()
          This assumes the hostname has been set using the method setHostname(String).
static SensorEventsAPIAccess getSensorEventsAPIAccess(java.lang.String hostname)
           
static SensorEventsAPIAccess getSensorEventsAPIAccess(java.lang.String hostname, java.lang.String port)
           
static SensorEventsAPIAccess getSensorEventsAPIAccess(java.lang.String hostname, java.lang.String port, java.lang.String alePort)
           
static void setAlePort(java.lang.String port)
          set port used for ALE web service access (default: 9080)
static void setHostname(java.lang.String hostname)
          This function is only needed if you are intending to access the IBM WebSphere Sensor Events APIs remotely.
static void setPort(java.lang.String port)
          set port used for web service access (default: 9080)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setHostname

public static void setHostname(java.lang.String hostname)
This function is only needed if you are intending to access the IBM WebSphere Sensor Events APIs remotely.

An example of a hostname String needed for accessing a IBM WebSphere Sensor Events Server at IP address 192.168.1.1 with hostname wse.server.ibm.com would be "192.168.1.1" or "wse.server.ibm.com".

Parameters:
hostname - the hostname of a remote IBM WebSphere Sensor Events installation needed to access the IBM WebSphere Sensor Events Web Service interface.

getHostname

public static java.lang.String getHostname()
Returns:
a String representing the IBM WebSphere Sensor Events hostname.
See Also:
setHostname(String)

getSensorEventsAPIAccess

public static SensorEventsAPIAccess getSensorEventsAPIAccess(java.lang.String hostname)
Parameters:
hostname - is the hostname of the local or remote IBM WebSphere Sensor Events installation. If this API call is being made on the machine that the IBM WebSphere Sensor Events is installed on, it will return a SensorEventsAPIAccessLocal singleton. If on a different machine, a SensorEventsAPIAccessRemote singleton will be returned and default web service port (9080) will be used.
Returns:
a SensorEventsAPIAccess object
See Also:
SensorEventsAPIAccess, getSensorEventsAPIAccess(String, String), SensorEventsAPIAccessRemote, SensorEventsAPIAccessLocal, setHostname(String)

getSensorEventsAPIAccess

public static SensorEventsAPIAccess getSensorEventsAPIAccess(java.lang.String hostname,
                                                             java.lang.String port)
Parameters:
hostname - is the hostname of the local or remote IBM WebSphere Sensor Events installation. If this API call is being made on the machine that the IBM WebSphere Sensor Events is installed on, it will return a SensorEventsAPIAccessLocal singleton. If on a different machine, a SensorEventsAPIAccessRemote singleton will be returned.
port - is the port to be used to make a web services (remote) call to both IBM WebSphere Sensor Events base APIs and ALE APIs. If ALE uses a different port use getSensorEventsAPIAccess(String, String, String). If port is null or empty, default of 9080 will be used.
Returns:
a SensorEventsAPIAccess object
See Also:
SensorEventsAPIAccess, SensorEventsAPIAccessRemote, SensorEventsAPIAccessLocal, setHostname(String)

getSensorEventsAPIAccess

public static SensorEventsAPIAccess getSensorEventsAPIAccess(java.lang.String hostname,
                                                             java.lang.String port,
                                                             java.lang.String alePort)
Parameters:
hostname - is the hostname of the local or remote IBM WebSphere Sensor Events Server installation. If this API call is being made on the machine that the IBM WebSphere Sensor Events is installed on, it will return a SensorEventsAPIAccessLocal singleton. If on a different machine, a SensorEventsAPIAccessRemote singleton will be returned.
port - is the port to be used to make a web services (remote) call to IBM WebSphere Sensor Events base APIs
alePort - is the port to be used to make a web services (remote) call to IBM WebSphere Sensor Events ALE APIs
Returns:
a SensorEventsAPIAccess object

getSensorEventsAPIAccess

public static SensorEventsAPIAccess getSensorEventsAPIAccess()
This assumes the hostname has been set using the method setHostname(String). If it has not been set, expect to see SensorEventsAPIAccessException exceptions unless in a "local" environment.

Returns:
a SensorEventsAPIAccess object
See Also:
getSensorEventsAPIAccess(String), setHostname(String)

getALEAccess

public static ALEAccess getALEAccess(java.lang.String hostname,
                                     java.lang.String alePort)
Parameters:
hostname - hostname of the IBM WebSphere Sensor Events
alePort - port Ale is to use for triggers
Returns:
ALEAccess object

getALEAccess

public static ALEAccess getALEAccess()
Returns:
AleAccess object

getPort

public static java.lang.String getPort()
get port used for web service access (default: 9080).

Returns:
port. If port has not been set or is empty, default (9080) will be returned.

setPort

public static void setPort(java.lang.String port)
set port used for web service access (default: 9080)

Parameters:
port - port to be set

getAlePort

public static java.lang.String getAlePort()
get port used for ALE web service access (default: 9080).

Returns:
port. If port has not been set or is empty, default (9080) will be returned.

setAlePort

public static void setAlePort(java.lang.String port)
set port used for ALE web service access (default: 9080)

Parameters:
port - port to be set


Copyright © 2005 - 2009 IBM Corp. All Rights Reserved.