public class ILProto
extends java.lang.Object
| Constructor and Description |
|---|
ILProto(java.net.Socket socket)
construcor initializes the class' socket, inStream and outStream attributes
|
| Modifier and Type | Method and Description |
|---|---|
int |
errMin() |
java.lang.String |
errMsg() |
java.lang.String |
receiveMessage()
this method reads from the inpuStream of the provided socket, checks for
the magic word and returns relevant info
|
int |
receiveReply() |
void |
sendMessage(java.lang.String msg) |
void |
sendReply(int errCode,
int minErrCode,
java.lang.String message)
this method encodes and sends a reply to the interlogger via the socket's
outputStream
|
public ILProto(java.net.Socket socket)
throws java.io.IOException
socket - an SSLSocketjava.io.IOException - if any I/O operation failspublic java.lang.String receiveMessage()
throws java.io.IOException
java.io.IOException - if any I/O operation failspublic void sendMessage(java.lang.String msg)
throws java.io.IOException
java.io.IOExceptionpublic int receiveReply()
throws java.io.IOException,
LBException
java.io.IOExceptionLBExceptionpublic int errMin()
public java.lang.String errMsg()
public void sendReply(int errCode,
int minErrCode,
java.lang.String message)
throws java.io.IOException
errCode - errCode of the callingminErrCode - minimum available errcodemessage - message for the interlogger - could be any Stringjava.io.IOException - if any I/O operation fails