Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Event Processing
11g Release 1 (11.1.1.7)

E14303-11
FRAMES    NO FRAMES
DETAIL:  FIELD | CONSTR | METHOD


com.oracle.cep.cartridge
Interface ExternalFunctionProvider


public interface ExternalFunctionProvider

An ExternalFunctionProvider defines a set of functions that can be directly accessed within CQL queries and views.

ExternalFunctionProviders are part of the OCEP Cartridge infrastructure.

Register an OSGi service implementing this interface to make it available to CQL processors. Furthermore, the provider must specify the service property ExternalContants.SERVER_CONTEXT_LINK_ID to indicate the link id that must be used in CQL queries and views to identify the provider.

The following code demonstrates how this can be done declaratively:

  <osgi:service interface="com.oracle.cep.cartridge.ExternalFunctionProvider">
    <osgi:service-properties>
      <entry key="server.context.link.id" value="mylink"/>
    </osgi:service-properties>
    <bean class="mypackage.MyExternalFunctionProvider"/>
  </osgi:service>
 

ExternalFunctionProviders are managed as a CartridgeMBean.

See Also:
ExternalConstants, CartridgeMBean

Method Summary
 ExternalFunction getFunction(java.lang.String functionName, java.lang.Class[] parameterTypes, java.lang.String caller, java.util.Map context)
          Return a function's metadata, including its execution call-back.
 java.lang.String getId()
          Unique identifier for function provider (cartridge).
 java.util.List listFunctions(java.lang.String caller, java.util.Map context)
          Return a list of all functions supported by this provider.

 

Method Detail

getId

public java.lang.String getId()
Unique identifier for function provider (cartridge).

In an OSGi env, this generally should map to the bundle's symbolic name of the provider.

Returns:
String

getFunction

public ExternalFunction getFunction(java.lang.String functionName,
                                    java.lang.Class[] parameterTypes,
                                    java.lang.String caller,
                                    java.util.Map context)
                             throws AmbiguousFunctionException,
                                    FunctionNotFoundException
Return a function's metadata, including its execution call-back. This method is invoked by the infrastructure when metadata for a particular function that has been accessed within a CQL query or view is needed.
Parameters:
functionName - The name of the function
parameterTypes - The type of the parameters as Java Classes.
caller - The caller of the CQL query/view, generally being the application name.
context - Additional context provided by the caller.
Returns:
function metadata
Throws:
FunctionNotFoundException - if function is not found
AmbiguousFunctionException - if more than one function is identifier for parameters.

listFunctions

public java.util.List listFunctions(java.lang.String caller,
                                    java.util.Map context)
Return a list of all functions supported by this provider. This method is invoked by the infrastructure for the purpose of management. A provider may choose to return an empty (or null) list if the functions cannot be determined a priori. This does not mean that the provider supports no functions, but rather that the list cannot be determined at this point.
Parameters:
caller - The caller of the CQL query/view, generally being the application name.
context - Additional context provided by the caller.
Returns:
list of all supported functions, or null.

Overview  Package   Class   Use  Tree  Deprecated  Index  Help 
Copyright © 2007, 2013 Oracle and/or its affiliates. All rights reserved.
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD