|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ca.jcs.processor.script.ScriptStyleOpProxyHandler
public class ScriptStyleOpProxyHandler
Delegated to by MetaOpBindingsProxyHandler to take care of script-style
op bindings. Note that use of script-style bindings with either OP or POST timings removes
the possibility of streaming search results to the client piece-meal, but instead forces
all results accumulated in memory at the same time.
| Field Summary | |
|---|---|
static String |
SCRIPT_NAME_CONNECTOR
Name by which scripts can access parent connector which they are wrapping. |
static String |
SCRIPT_NAME_CURR_ATTRS
Name which scripts can use to access the current (pre-modify) attribute values for the target object during modify requests. |
static String |
SCRIPT_NAME_LOOKUP_ATTRS_RESULTS
Name which should be used by scripts to record results of lookup request. |
static String |
SCRIPT_NAME_SEARCH_RESULTS
Name which should be used by scripts to record results of search request. |
static String |
SCRIPT_NAME_SEARCH_RESULTS_BLOCKING_QUEUE
Name which should be used by scripts to queue results from asynchronously processed search requests. |
static String |
SCRIPT_NAME_STATUS_ARRAY
Name by which scripts can access status array, where element [0] should be filled with a description when an error is encountered. |
static String |
SCRIPT_TERMINATE_STATUS
Value which may be put into element [0] of SCRIPT_NAME_STATUS_ARRAY in which case script
should periodically check it and exit. |
static String |
SEARCH_RESULTS_COMPLETE
|
| Constructor Summary | |
|---|---|
ScriptStyleOpProxyHandler(MetaConnector metaConnector,
Opbindings metaData,
ScriptStyleOpProcessor scriptStyleOpProcessor,
Logger log)
Creates a proxy handler for executing scripts around operations targeting metaConnector. |
|
| Method Summary | |
|---|---|
static void |
debug(String message,
boolean dumpStack)
Calls debug(String, Object, boolean, int) with null Object argument. |
static void |
debug(String message,
boolean dumpStack,
int pos)
A method which exists simply so it can be called from scripts and provide an easy anchor point for examining the Java stack and simply debug(String, Object, boolean, int) underneath. |
static void |
debug(String message,
int pos)
A method which exists simply so it can be called from scripts and provide an easy anchor point for examining the Java stack and simply calls debug(String, Object, boolean, int) underneath. |
static void |
debug(String message,
Object obj,
boolean dumpStack)
A method which exists simply so it can be called from scripts and provide an easy anchor point for examining the Java stack. |
static void |
debug(String message,
Object obj,
boolean dumpStack,
int pos)
A method which exists simply so it can be called from scripts and provide an easy anchor point for examining the Java stack and simply calls debug(String, Object, boolean) underneath. |
Object |
invokeQueryWithOpTiming(Method method,
Operation op,
Object[] args,
ObjectInfo objInfo,
OpBindingType binding,
List<String> argNames)
Execute a single query script as a timing=OP binding. |
Object |
invokeQueryWithPostTiming(Method method,
OpBindingMethodInfo methodInfo,
Object[] args,
ObjectInfo objInfo,
List<OpBindingType> bindings,
List<String> argNames,
Object ret)
Execute one or more bindings with timing=POST after query operations, namely POST doLookUp/Assocs() and doSearch/Assocs() make sense. |
void |
invokeUpdateWithTiming(Method method,
Operation op,
Object[] args,
ObjectInfo objInfo,
AttributesProxy currAttrs,
Timing timing,
OpBindingType binding,
List<String> argNames)
|
static boolean |
isExecutedDirectly(OpBindingType binding)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SCRIPT_NAME_CONNECTOR
public static final String SCRIPT_NAME_STATUS_ARRAY
public static final String SCRIPT_NAME_SEARCH_RESULTS
public static final String SCRIPT_NAME_LOOKUP_ATTRS_RESULTS
public static final String SCRIPT_NAME_SEARCH_RESULTS_BLOCKING_QUEUE
public static final String SCRIPT_NAME_CURR_ATTRS
public static final String SCRIPT_TERMINATE_STATUS
SCRIPT_NAME_STATUS_ARRAY in which case script
should periodically check it and exit.
public static final String SEARCH_RESULTS_COMPLETE
| Constructor Detail |
|---|
public ScriptStyleOpProxyHandler(MetaConnector metaConnector,
Opbindings metaData,
ScriptStyleOpProcessor scriptStyleOpProcessor,
Logger log)
metaConnector.
| Method Detail |
|---|
public static void debug(String message,
Object obj,
boolean dumpStack)
message - Printed out to stderr.obj - - obj.toString() is printed to stderr (may an object whose state you want to inspect in Java debugger).dumpStack - - if true then stack trace is written to stderr.
public static void debug(String message,
boolean dumpStack)
debug(String, Object, boolean, int) with null Object argument.
public static void debug(String message,
int pos)
debug(String, Object, boolean, int) underneath.
pos - is to make it easy to add a conditional method breakpoint at particular point of interest
during execution of a script, by giving each such point of interest an identifying "pos" value.
public static void debug(String message,
boolean dumpStack,
int pos)
debug(String, Object, boolean, int) underneath.
pos - is to make it easy to add a conditional method breakpoint at particular point of interest
during execution of a script, by giving each such point of interest an identifying "pos" value.
public static void debug(String message,
Object obj,
boolean dumpStack,
int pos)
debug(String, Object, boolean) underneath.
pos - is to make it easy to add a conditional method breakpoint at particular point of interest
during execution of a script, by giving each such point of interest an identifying "pos" value.public static boolean isExecutedDirectly(OpBindingType binding)
public void invokeUpdateWithTiming(Method method,
Operation op,
Object[] args,
ObjectInfo objInfo,
AttributesProxy currAttrs,
Timing timing,
OpBindingType binding,
List<String> argNames)
throws NamingException
NamingException - If entire operation associated with
op binding should be terminated (got non-null error status and
strict completion is true).
public Object invokeQueryWithOpTiming(Method method,
Operation op,
Object[] args,
ObjectInfo objInfo,
OpBindingType binding,
List<String> argNames)
throws NamingException
doLookUp()) / collection of Maps (doList()
and doSearch()). If maps are used then the attributes !name! and
!objectclass are special.
do*() Java methods.
NamingException
public Object invokeQueryWithPostTiming(Method method,
OpBindingMethodInfo methodInfo,
Object[] args,
ObjectInfo objInfo,
List<OpBindingType> bindings,
List<String> argNames,
Object ret)
throws NamingException
The POST doLookUp/Assocs() scripts have beans declared matching all arguments for the target methods, most importantly
including an Attributes object bound to the name attrs, which they can update.
POST doSearch() scripts are given a NamingEnumeration<SearchResult> object
bound to the name searchResults and can update these SearchResults and return one of:
Note that use of script-style search bindings immediately removes the possibility of streamed search results.
NamingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||