org.glite.lb

Class ILProto

public class ILProto extends Object

this class handles communication with LB server (reads messages it sends)
Constructor Summary
ILProto(Socket socket)
construcor initializes the class' socket, inStream and outStream attributes
Method Summary
interrMin()
StringerrMsg()
StringreceiveMessage()
this method reads from the inpuStream of the provided socket, checks for the magic word and returns relevant info
intreceiveReply()
voidsendMessage(String msg)
voidsendReply(int errCode, int minErrCode, String message)
this method encodes and sends a reply to the interlogger via the socket's outputStream

Constructor Detail

ILProto

public ILProto(Socket socket)
construcor initializes the class' socket, inStream and outStream attributes

Parameters: socket an SSLSocket

Throws: java.io.IOException

Method Detail

errMin

public int errMin()

errMsg

public String errMsg()

receiveMessage

public String receiveMessage()
this method reads from the inpuStream of the provided socket, checks for the magic word and returns relevant info

Returns: a String containing third line of the inputStream data, without the info about its length

Throws: IOException

receiveReply

public int receiveReply()

sendMessage

public void sendMessage(String msg)

sendReply

public void sendReply(int errCode, int minErrCode, String message)
this method encodes and sends a reply to the interlogger via the socket's outputStream

Parameters: errCode errCode of the calling minErrCode minimum available errcode message message for the interlogger - could be any String

Throws: IOException