Custom URI scheme

Custom scheme(s) can be created to access payload not normally accessible to VersaLex. A URI scheme must start with a letter and be followed by one or more alpha-numeric characters.

The custom URI scheme implementation must provide three basic classes:

  1. File class – A class that provides that similar functionality as the java.io.File class. The custom Scheme File class must extend com.cleo.lexicom.beans.LexURIFile.
  2. InputStream class – A class that provides similar functionality as the java.io.InputStream class. The custom Scheme InputStream class must extend java.io.InputStream.
  3. OutputStream class – A class that provides similar functionality as the java.io.OutputStream class. The custom Scheme OutputStream class must extend java.io.OutputStream.

These three custom-written classes are configured in system properties. System properties are used to configure the class names for single URI scheme:

cleo.uri. scheme .file                   (required)

cleo.uri. scheme .inputstream      (required)

cleo.uri. scheme .outputstream    (required)

In addition, an optional classpath variable is provided to specify the path to the implementation jar and any support jar files necessary:

cleo.uri. scheme .classpath         (optional)

If any additional jars need to be in the base VersaLex class loader, then the cleo.additional.classpath system property must be used.

The Cleo versions of JMS, MSMQ, and VLPipe can be replaced with custom versions by specifying these system properties for JMS, MSMQ, or VLPipe and naming the custom classes.

Further documentation for custom URI schemes is provided in the API documentation (see LexURIFile in the JavaDocs).