|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface specifies all the methods a CommunicationsClient object must support allowing the details of the specific protocol used to be abstracted away.
CommunicationsObject
Method Summary | |
java.lang.String |
addRequestProtocol(java.lang.String data,
java.lang.String listener)
This abstract method adds the protocol to a request to be sent |
java.lang.String |
addRequestProtocol(java.lang.String data,
java.lang.String listener,
java.lang.String type)
This abstract method adds the protocol to a request to be sent |
DataObject |
getErrorMessage()
This abstract method generates an error message if a request can't be handled properly, to the point where a contextual error message can still be sent as the reply |
java.lang.String |
getFatalMessage()
This abstract method generates an fatal message if a request can't be handled properly, to the point where no contextual error message can be sent as the reply |
java.lang.String |
getProtocol()
Abstract method to get the communications protocol being used |
java.net.Socket |
sendRequest(java.lang.String request)
This abstract method sends a request |
RequestData |
stripReplyProtocol(java.net.Socket socket)
This abstract method strips the protocol away from the received reply |
Method Detail |
public java.lang.String getProtocol()
public RequestData stripReplyProtocol(java.net.Socket socket) throws ProtocolException
socket
- The socket the reply is being received onaddRequestProtocol(String,String)
,
CommunicationsServer.stripRequestProtocol(Socket)
,
CommunicationsServer.addReplyProtocol(String)
public java.lang.String addRequestProtocol(java.lang.String data, java.lang.String listener) throws ProtocolException
data
- The request to add the protocol tolistener
- The recipient of the request (eg, an URL in HTTP). May be null.stripReplyProtocol(Socket)
,
CommunicationsServer.stripRequestProtocol(Socket)
,
CommunicationsServer.addReplyProtocol(String)
public java.lang.String addRequestProtocol(java.lang.String data, java.lang.String listener, java.lang.String type) throws ProtocolException
data
- The request to add the protocol tolistener
- The recipient of the request (eg, an URL in HTTP). May be null.type
- The type of the request: GET or POST.stripReplyProtocol(Socket)
,
CommunicationsServer.stripRequestProtocol(Socket)
,
CommunicationsServer.addReplyProtocol(String)
public java.net.Socket sendRequest(java.lang.String request)
request
- The request to sendpublic DataObject getErrorMessage()
DataObject
- containing the error messagegetFatalMessage()
public java.lang.String getFatalMessage()
String
- containing the fatal messagegetErrorMessage()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |