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().
Modifier and Type | Method and Description |
---|---|
boolean |
addrsPersist()
Query BBjBridge as to whether ADDRd programs are persistent
between successive calls to the bridge.
|
void |
close()
Close connection to server.
|
boolean |
environmentPersists()
Query BBjBridge as to whether BBj environment is persistent
between successive calls to the bridge.
|
boolean |
hasPersistentConnection()
Query BBjBridge as to whether connection is persistent.
|
int |
runBBj(BBjBridgeRequest request,
BBjBridgeResponse response,
long p_timeoutMSec)
Executes the BBj program specified in the request.
|
boolean |
variablesPersist()
Query BBjBridge as to whether variables are persistent
between successive calls to the bridge.
|
int runBBj(BBjBridgeRequest request, BBjBridgeResponse response, long p_timeoutMSec) throws BBjBridgeException
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.Indicates
- a problem running the BBj program.BBjBridgeException
boolean hasPersistentConnection()
boolean environmentPersists()
boolean variablesPersist()
boolean addrsPersist()
void close()