public class JavaGenericComputation
extends java.lang.Object
Constructor and Description |
---|
JavaGenericComputation(java.lang.String progName)
Constructor, simply grabs the runtime, needs a program name
|
Modifier and Type | Method and Description |
---|---|
void |
closeConnection()
Function to close all open connections
|
void |
sendMessage(JavaByteMessage j)
Function which allows the resource to send messages to an attached
computation
|
void |
startExecution(java.lang.String executeCommand,
int commType,
JavaMessageHandler jmh)
Starts execution of a bridged program, needs actual execution command,
type of communication, and a link to the appropriate message handler As a
note, error stream is used even with TCP communications
|
JavaGenericComputation |
switchCommunication(JavaByteMessage switchMessage,
int newCommType)
Allows the user to switch communication types from Java.
|
public JavaGenericComputation(java.lang.String progName)
progName
- Identifying name for the program - does not directly effect
execution.public void startExecution(java.lang.String executeCommand, int commType, JavaMessageHandler jmh) throws java.io.IOException
executeCommand
- command to be executed to start the programcommType
- as specified in ControlMessage - UPIPES and TCP currently
supported, default is UPIPESjmh
- the message handler for this programjava.io.IOException
public JavaGenericComputation switchCommunication(JavaByteMessage switchMessage, int newCommType) throws java.io.IOException
switchMessage
- Actual message for switching communications - should be
formatted in an appropriate manner for the connected
computationnewCommType
- From ControlMessage - UPIPES and TCP currently supportedjava.io.IOException
public void sendMessage(JavaByteMessage j)
j
- Message to sendpublic void closeConnection() throws java.io.IOException
java.io.IOException