Extension Types
The Caliper SDK gives you the ability to extend the Q2 Product offering in a variety of ways, from Online Banking forms to Back Office pages to SSO integrations. Each of these have distinct shapes sent across the network, which require corresponding handling of this traffic. The SDK answers this problem with RequestHandlers.
There are lots of RequestHandler types in the Caliper SDK, which are detailed below, but they all have some things in common. For instance:
self.logger
- This is an instance of a python logger, which can be called with a number of standard log levels to give you more visibility into your application at runtime.
self.logger.INFO(“Here’s an info level line”)
self.logger.DEBUG(“Here’s a debug level line”)
Used in conjunction with
q2 run -l <log_level>
you have very granular control over what parts of your application are logged out.
self.core
- This is a lazy loaded instance of the core referenced inconfiguration/settings.py:CORE
. If this is set to None in your settings file, an error will be thrown. More on cores in the Custom Coreflows section of the doc
HTTP Handlers
Most of the RequestHandlers are this type, meaning a port is opened and
your extensions “listen” for traffic when you type q2 run
.
They can all install themselves into the Q2 database with the
q2 install
commandThey can all uninstall themselves with the
q2 uninstall
commandThey can all return information about their installation with the
q2 get_installed
commandThey all have a
get
function that can be filled out to handle HTTP GET requestsThey all have a
post
function that can be filled out to handle HTTP POST requests
Ultimately these all inherit from Tornado’s RequestHandler, so all of those docs are relevant as well.
For specific request types, look at the detailed docs below:
-
Used for API calls from the outside world
-
Extends our CSR Administration product (Central)
-
Extends Q2 Online Banking using jinja templates
This is the handler in the server side rendering tutorial
-
Extends Q2 Online Banking with robust front end frameworks
This is the handler in the client side rendering tutorial
-
Plug outside services into the Q2 Online interface
-
Listens for messages posted from the Kafka Message Bus
-
Custom adapters for Wires, FX Rates, or handling authentication tokens
-
Extends our CSR Administration product (Console)
Caliper API Custom Endpoint Request Handler
Build an API endpoint that is callable from the Caliper API
Non HTTP Handlers
It is also possible to have Handlers that get their input from other means. These are outlined below:
-
Create code flows to build a custom health snapshot of an extension
Custom statuses are shown in the built-in status endpoint: Built-in Extensions
Supporting Handlers
-
Contains common code for all HTTP RequestHandlers
-
Common code for Handlers that get data from HQ (Central/Online/Tecton)
Q2TectonBaseRequestHandler
Common code for Q2TectonClientRequestHandler and Q2TectonServerRequestHandler
Deprecated Handlers
Q2LegacyRequestHandler
Replaced by all the specific handler types above
Q2TectonOnlineRequestHandler
Replaced by Q2TectonServer and Q2TectonClient Handlers
Pre-44 Handler: Online Request Handler
Extends Q2 Online Banking prior to 4.4.0