|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object CTL.Remote
public class Remote
Static methods for remote communication based on the CTL protocol
Field Summary | |
---|---|
static int |
C
Constants for different languages |
static int |
CPP
|
static int |
CTRL
Control message |
static int |
DAT
Send data directly |
static int |
DBG
Debug Info |
static int |
EOC
End of communication |
static int |
ERR
Error |
static int |
FORTRAN
|
static int |
JAVA
|
static java.lang.String |
magic
Magic string to check for correct byte order and filtering when using the pipe transport mechanism |
static int |
magic2
|
static int |
OPER
Operation |
static int |
RMI
Remote method invocation |
static int |
SSH
SSH connect |
private static int |
tag
Start tag for user defined message types |
static int |
UNDEF
Undefined |
Constructor Summary | |
---|---|
Remote()
|
Method Summary | |
---|---|
private static void |
__answer(Communicator comm,
Header head,
long objID,
Except ex,
IStream2 args,
boolean keep_args)
Remote answer function |
private static void |
__call(Communicator comm,
Header head,
long objID,
FID fid,
IStream2 args,
rPointer objID2,
boolean keep_args)
Remote call function |
static void |
answer(Communicator comm,
Header head,
long objID,
Except ex,
IStream2 args)
Answer wrapper for logging, etc. |
static void |
call(Communicator comm,
Header head,
long objID,
FID fid,
IStream2 args,
rPointer objID2)
Call wrapper for logging, etc. |
static java.lang.String |
parseMType(int mtype)
Convert a numerical message type to string |
static java.lang.Object |
readDAT(Communicator comm,
java.lang.String type)
Read a DAT message |
static GroupInfo |
readHS(Communicator comm)
Read handshake |
static void |
writeDAT(Communicator comm,
java.lang.Object data)
Write a DAT message |
static void |
writeDAT(Communicator comm,
java.lang.Object data,
IPaddr host,
int port)
|
static void |
writeDBG(Communicator comm,
byte[] data)
Write a message to the debug socket of a communicator. |
static void |
writeHS(GroupInfo grp,
Communicator comm)
Write handshake |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String magic
public static final int magic2
public static final int EOC
public static final int DAT
public static final int OPER
public static final int RMI
public static final int CTRL
public static final int ERR
public static final int SSH
public static final int DBG
public static final int UNDEF
public static final int C
public static final int CPP
public static final int FORTRAN
public static final int JAVA
private static int tag
Constructor Detail |
---|
public Remote()
Method Detail |
---|
public static java.lang.String parseMType(int mtype)
mtype
- Message type
public static java.lang.Object readDAT(Communicator comm, java.lang.String type) throws java.io.IOException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, java.lang.InstantiationException, CTLException
comm
- Communicator to usetype
- Type to read
java.io.IOException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
java.lang.InstantiationException
CTLException
public static void writeDAT(Communicator comm, java.lang.Object data) throws java.io.IOException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, java.lang.InstantiationException, CTLException
comm
- Communicator to usedata
- Value to send
java.io.IOException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
java.lang.InstantiationException
CTLException
public static void writeDAT(Communicator comm, java.lang.Object data, IPaddr host, int port) throws java.io.IOException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, java.lang.InstantiationException, CTLException
java.io.IOException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
java.lang.InstantiationException
CTLException
public static void writeHS(GroupInfo grp, Communicator comm) throws java.io.IOException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, java.lang.InstantiationException, CTLException
grp
- Group informationcomm
- Communicator to use
java.io.IOException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
java.lang.InstantiationException
CTLException
public static void writeDBG(Communicator comm, byte[] data)
comm
- Some TCPCommunicatordata
- The data to writepublic static GroupInfo readHS(Communicator comm) throws java.io.IOException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, java.lang.InstantiationException, CTLException
comm
- Communicator to use
java.io.IOException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
java.lang.InstantiationException
CTLException
private static void __call(Communicator comm, Header head, long objID, FID fid, IStream2 args, rPointer objID2, boolean keep_args) throws java.io.IOException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, CTLException
comm
- Communicator to usehead
- HeaderobjID
- ObjectIDfid
- FunctionIDargs
- IStream2 which stores the argumentskeep_args
- Whether or not to keep the args in the IStream2 for
successive function calls
java.io.IOException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
CTLException
public static void call(Communicator comm, Header head, long objID, FID fid, IStream2 args, rPointer objID2) throws java.io.IOException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, CTLException
java.io.IOException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
CTLException
public static void answer(Communicator comm, Header head, long objID, Except ex, IStream2 args) throws java.io.IOException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, CTLException
java.io.IOException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
CTLException
private static void __answer(Communicator comm, Header head, long objID, Except ex, IStream2 args, boolean keep_args) throws java.io.IOException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, CTLException
comm
- Communicator to usehead
- HeaderobjID
- ObjectIDex
- Exceptionargs
- IStream2 which stores the argumentskeep_args
- Whether or not to keep the arguments in the IStream2
for successive calls
java.io.IOException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
CTLException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |