net.sourceforge.wurfl.wurflapi
Class ObjectsManager

java.lang.Object
  |
  +--net.sourceforge.wurfl.wurflapi.ObjectsManager

public class ObjectsManager
extends java.lang.Object

Author:
Luca Passani, passani at eunet dot no

Rather than initializing a new CapabilityMatrix and UAManager each time you need one, you should request ObjectsManager to give you the instance of an existing one.
The advantage of this approach are huge in terms of performance and memory usage, particularly in the contaxt of web applications.

Constructor Summary
ObjectsManager()
           
 
Method Summary
static CapabilityMatrix getCapabilityMatrixInstance()
          Use this method to retrieve the existing instance of the CapabilityMatrix (or get one initialized for you).
static void getFilteredWurfl(java.util.HashSet capaList, java.io.OutputStream out)
           
static ListManager getListManagerInstance()
          Use this method to retrieve the existing instance of the ListManager (or get one initialized for you).
static UAManager getUAManagerInstance()
          Use this method to retrieve the existing instance of the UAManager (or get one initialized for you).
static java.lang.String getWURFLAsXML()
          Get an XMLized version of the WURFL (WURFL+patch Object Model turned into an XML file)
static net.sourceforge.wurfl.wurflapi.Wurfl getWurflInstance(java.lang.String parameter)
           
static net.sourceforge.wurfl.wurflapi.Wurfl getWurflInstance(java.lang.String parameter, java.lang.String patch)
          You are not allowed to manipulate a Wurfl object directly through the published API.
static void initFromWebApplication(javax.servlet.ServletContext sc)
          Use this method to initialize from inside a web application
static void initFromWebApplication(java.lang.String path)
          Use this method to initialize if you have your WURFL in unusual places
static void initFromWebApplication(java.lang.String path, java.lang.String pathToPatch)
          Use this method to initialize if you have your WURFL in unusual places
static void initMyWay(WurflSource ws)
          This method lets you initialize the WURFL by providing an object which knows how to get to the input streams
static boolean isWurflInitialized()
          Use this method to understand if the WURFL is already initialized or not
static void resetWurfl()
          Use this method to force the library to reload the WURFL again
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectsManager

public ObjectsManager()
Method Detail

getWurflInstance

public static net.sourceforge.wurfl.wurflapi.Wurfl getWurflInstance(java.lang.String parameter,
                                                                    java.lang.String patch)
You are not allowed to manipulate a Wurfl object directly through the published API. This method is left public because it gives you a chance to initialize the WURFL with a wurfl.xml file located in a place where the library does not look at by default.


getWurflInstance

public static net.sourceforge.wurfl.wurflapi.Wurfl getWurflInstance(java.lang.String parameter)

getCapabilityMatrixInstance

public static CapabilityMatrix getCapabilityMatrixInstance()
Use this method to retrieve the existing instance of the CapabilityMatrix (or get one initialized for you). Similar to a Singleton in a way.


getUAManagerInstance

public static UAManager getUAManagerInstance()
Use this method to retrieve the existing instance of the UAManager (or get one initialized for you).


getListManagerInstance

public static ListManager getListManagerInstance()
Use this method to retrieve the existing instance of the ListManager (or get one initialized for you).


isWurflInitialized

public static boolean isWurflInitialized()
Use this method to understand if the WURFL is already initialized or not


getWURFLAsXML

public static java.lang.String getWURFLAsXML()
Get an XMLized version of the WURFL (WURFL+patch Object Model turned into an XML file)


initFromWebApplication

public static void initFromWebApplication(javax.servlet.ServletContext sc)
Use this method to initialize from inside a web application


initFromWebApplication

public static void initFromWebApplication(java.lang.String path)
Use this method to initialize if you have your WURFL in unusual places


initFromWebApplication

public static void initFromWebApplication(java.lang.String path,
                                          java.lang.String pathToPatch)
Use this method to initialize if you have your WURFL in unusual places


initMyWay

public static void initMyWay(WurflSource ws)
This method lets you initialize the WURFL by providing an object which knows how to get to the input streams


getFilteredWurfl

public static void getFilteredWurfl(java.util.HashSet capaList,
                                    java.io.OutputStream out)

resetWurfl

public static void resetWurfl()
Use this method to force the library to reload the WURFL again



Copyright © 2003,2004 Luca Passani.