Interface JavaBBjBridge


public interface JavaBBjBridge

A JavaBBjBridge allows a Java program to execute a BBj program and to communicate to that program using BBjRequest and BBjResponse. The BBj process is able to access the content of the BBjRequest and to write into the BBjResponse by opening a channel to a device that has been ALIASed to com.basis.bbj.bridge.BBjBridgeOpenPlugin. More information about opening this channel can be found in the BBj documentation of OPEN verb.

runBBj() Will block until the BBjProcess terminates. It will then return the return code of the BBjProcess. Anything that the process has written to the ALIASed channel will be available in the BBjResponse.

An instance of JavaBBjBridge may be obtained by calling JavaBBjBridgeFactory.createBridge().

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Query BBjBridge as to whether ADDRd programs are persistent between successive calls to the bridge.
    void
    Close connection to server.
    boolean
    Query BBjBridge as to whether BBj environment is persistent between successive calls to the bridge.
    boolean
    Query BBjBridge as to whether connection is persistent.
    int
    runBBj(BBjBridgeRequest p_request, BBjBridgeResponse p_response, long p_timeoutMSec)
    Executes the BBj program specified in the request.
    boolean
    Query BBjBridge as to whether variables are persistent between successive calls to the bridge.
  • Method Details

    • runBBj

      int runBBj(BBjBridgeRequest p_request, BBjBridgeResponse p_response, long p_timeoutMSec) throws BBjBridgeException
      Executes the BBj program specified in the request.
      Parameters:
      p_request - Data provided by the Java program which is available to the BBj program.
      p_response - Data written by the BBj program that is available to the Java program.
      p_timeoutMSec - runBBj() will timeout after stated number of milliseconds if p_timeoutMSec is -1, runBBj will not timeout. If p_timeoutMSec is any other negative number or is zero, an Exception is thrown.
      Returns:
      The runtime return code of the BBj program.
      Throws:
      BBjBridgeException - Indicates a problem running the BBj program.
    • hasPersistentConnection

      boolean hasPersistentConnection()
      Query BBjBridge as to whether connection is persistent.
      Returns:
      A boolean indicating whether connection is persistent.
    • environmentPersists

      boolean environmentPersists()
      Query BBjBridge as to whether BBj environment is persistent between successive calls to the bridge.
      Returns:
      A boolean indicating whether STBL is persistent.
    • variablesPersist

      boolean variablesPersist()
      Query BBjBridge as to whether variables are persistent between successive calls to the bridge.
      Returns:
      A boolean indicating whether variables are persistent.
    • addrsPersist

      boolean addrsPersist()
      Query BBjBridge as to whether ADDRd programs are persistent between successive calls to the bridge.
      Returns:
      A boolean indicating whether variables are persistent.
    • close

      void close()
      Close connection to server.