BoxLang 🚀 A New JVM Dynamic Language Learn More...

cbproxies

v1.3.0+3 Modules


Copyright Since 2005 ColdBox Platform by Luis Majano and Ortus Solutions, Corp
www.coldbox.org | www.ortussolutions.com


cbproxies

The cbproxies module is a raw library that allows you to build Java dynamic proxies to several key classes that allows CFML to do concurrency, streaming, and much more. The BaseProxy can also be used so you can extend the module and create your own concrete dynamic proxies that extend the BaseProxy.

BaseProxy

This object is the cornerstone for creatning CFML dynamic proxies that can be used synchronously / asynchronously and keep the CFML environment for you. Every proxy needs to be created by CFML code:

proxy = new cbproxies.models.BiConsumer()

Each BaseProxy has the following base constructor init():

/**
 * Constructor
 *
 * @target         The target function to be applied via dynamic proxy to the required Java interface(s)
 * @debug          Add debugging messages for monitoring
 * @loadAppContext By default, we load the Application context into the running thread. If you don't need it, then don't load it.
 */
function init(
	required target,
	boolean debug          = false,
	boolean loadAppContext = true
)
  • target - This can be a closure/function that is stored in the proxy that will later be used by the implemented dynamic proxy call.
  • debug - Boolean flag that will enable debuging to console on certain key base proxy areas or by the implementing proxy.
  • loadAppContext - This will load up the CFML application context into the proxies scope. This will allow the Java implementation to talk to anything within the CFML engine: scopes, databases, queries, orm, etc.

Available Proxies

Here is a table of the available proxies in this module:

Proxy NameJava Class
BiConsumerjava.util.function.BiConsumer
BiFunctionjava.util.function.BiFunction
BinaryOperatorjava.util.function.BinaryOperator
Callablejava.util.concurrent.Callable
Comparatorjava.util.Comparator
Consumerjava.util.function.Consumer
Functionjava.util.function.Function
FutureFunctionjava.util.function.FutureFunction
Predicatejava.util.function.Predicate
Runnablejava.lang.Runnable
Supplierjava.util.function.Supplier
ToDoubleFunctionjava.util.function.ToDoubleFunction
ToIntFunctionjava.util.function.ToIntFunction
ToLongFunctionjava.util.function.ToLongFunction

Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com


HONOR GOES TO GOD ABOVE ALL

Because of His grace, this project exists. If you don't like this, then don't read it, its not for you.

"Therefore being justified by faith, we have peace with God through our Lord Jesus Christ: By whom also we have access by faith into this grace wherein we stand, and rejoice in hope of the glory of God. And not only so, but we glory in tribulations also: knowing that tribulation worketh patience; And patience, experience; and experience, hope: And hope maketh not ashamed; because the love of God is shed abroad in our hearts by the Holy Ghost which is given unto us. ." Romans 5:5

THE DAILY BREAD

"I am the way, and the truth, and the life; no one comes to the Father, but by me (JESUS)" Jn 14:1-12

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.


Unreleased

1.3.0 - 2024-05-22

1.2.0 - 2024-04-10

1.1.0 - 2023-04-28

Added

  • BoxLang Support

1.2.0 - 2024-04-10

1.1.0 - 2023-04-28

Added

  • Better engine recognition in base proxy
  • Added Adobe 2023 support

1.1.0 - 2023-04-28

Added

  • Updated github actions
  • Updated changelog builds
  • Add in LogBox and onException errors if available for all proxies #1

[1.0.1] => 2022-SEP-29

Fixed

  • Fixing snapshot left over on release box.json

[1.0.0] => 2022-SEP-29

  • First iteration of this module

$ box install cbproxies

No collaborators yet.
     
  • {{ getFullDate("2022-09-27T08:24:57Z") }}
  • {{ getFullDate("2024-05-22T08:56:40Z") }}
  • 1,809
  • 218,814