Package org.rapidcontext.app.proc
Class SessionCurrentProcedure
java.lang.Object
org.rapidcontext.core.storage.StorableObject
org.rapidcontext.core.type.Procedure
org.rapidcontext.app.proc.SessionCurrentProcedure
- All Implemented Interfaces:
Procedure
The built-in current session info procedure.
- Version:
- 1.0
-
Field Summary
Fields inherited from class org.rapidcontext.core.type.Procedure
ACTIVE_MILLIS, KEY_ALIAS, KEY_BINDING, KEY_DEPRECATED, KEY_DESCRIPTION, PATH
Fields inherited from class org.rapidcontext.core.storage.StorableObject
dict, KEY_ACTIVATED_TIME, KEY_CLASSNAME, KEY_ID, KEY_TYPE, PREFIX_COMPUTED, PREFIX_HIDDEN
-
Constructor Summary
ConstructorsConstructorDescriptionSessionCurrentProcedure
(String id, String type, Dict dict) Creates a new procedure from a serialized representation. -
Method Summary
Modifier and TypeMethodDescriptioncall
(CallContext cx, Bindings bindings) Executes a call of this procedure in the specified context and with the specified call bindings.static Dict
Serializes a file for usage in a procedure response.static Dict
Serializes a session for usage in a procedure response.Methods inherited from class org.rapidcontext.core.type.Procedure
alias, all, deprecated, description, find, getBindings, getDescription, getName, isActive
Methods inherited from class org.rapidcontext.core.storage.StorableObject
activate, activatedTime, destroy, id, init, isModified, passivate, path, serialize, sterilize, toString, type
-
Constructor Details
-
SessionCurrentProcedure
Creates a new procedure from a serialized representation.- Parameters:
id
- the object identifiertype
- the object type namedict
- the serialized representation
-
-
Method Details
-
call
Executes a call of this procedure in the specified context and with the specified call bindings. The semantics of what the procedure actually does, is up to each implementation. Note that the call bindings are normally inherited from the procedure bindings with arguments bound to their call values.- Specified by:
call
in interfaceProcedure
- Specified by:
call
in classProcedure
- Parameters:
cx
- the procedure call contextbindings
- the call bindings to use- Returns:
- the result of the call, or null if the call produced no result
- Throws:
ProcedureException
- if the call execution caused an error
-
serialize
Serializes a session for usage in a procedure response.- Parameters:
storage
- the storage to use for lookupssession
- the session object- Returns:
- the serialized session dictionary
-
serialize
Serializes a file for usage in a procedure response.- Parameters:
file
- the file object- Returns:
- the serialized file dictionary
-