com.sap.sl.sdk.framework
Class SlContext

java.lang.Object
  extended by com.sap.sl.sdk.framework.SlContext

public abstract class SlContext
extends java.lang.Object

This class is the entry point of the Semantic Layer SDK. It provides access to the SDK services.


Constructor Summary
SlContext()
           
 
Method Summary
abstract  void close()
          Releases the resources managed by the context.
static SlContext create()
          Creates a new context.
abstract
<T> T
getService(java.lang.Class<T> service)
          Retrieves an instance of a service.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SlContext

public SlContext()
Method Detail

create

public static SlContext create()
Creates a new context.

The context should be closed when it is no more needed. Once closed, the context cannot be used anymore.


getService

public abstract <T> T getService(java.lang.Class<T> service)
Retrieves an instance of a service.

An exception is thrown if the service cannot be provided.

Parameters:
service - The SDK service
Returns:
The instance of the service. It never returns null.

close

public abstract void close()
Releases the resources managed by the context.

Once closed, the context cannot be used anymore.



© Copyright 2016 SAP SE or an SAP affiliate company. All rights reserved.