|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.PingOO.DLAI.lib.net.UpperProtocol
The class which describes the upper protocol used by an appli and its driver.
The upper protocol does not interract with the network level.
It's basically just an automaton which desbribs how the connection work.
| Field Summary | |
protected ConnectionManager |
connectionManager
Send datas to the server. |
protected MessageFormatter |
formatter
Formats messages in the server's language. |
| Constructor Summary | |
UpperProtocol(ConnectionManager connectionManager,
MessageFormatter formatter)
Creates a new UpperProtocol instance. |
|
| Method Summary | |
ConnectionManager |
getConnectionManager()
Returns le ConnectionManager used by this protocol. |
MessageFormatter |
getMessageFormatter()
Returns le MessageFormatter used by this protocol. |
protected MessageHashtable |
makeByeMessage(java.lang.String slaveName)
Creates the message sent to the server for closing the connection. |
MessageHashtable |
request(MessageHashtable message)
Sends a request to the server and give back the server's answer. |
MessageHashtable |
request(MessageHashtable message,
java.lang.String server)
Sends a request to the server and give back the server's answer. |
MessageHashtable |
request(MessageHashtable message,
java.lang.String server,
java.lang.String port)
Sends a request to the server and give back the server's answer. |
MessageHashtable |
requestCrypted(MessageHashtable message)
Sends a request to the server and give back the server's answer. |
MessageHashtable |
requestCrypted(MessageHashtable message,
java.lang.String server)
Sends a request to the server and give back the server's answer. |
MessageHashtable |
requestCrypted(MessageHashtable message,
java.lang.String server,
java.lang.String port)
Sends a request to the server and give back the server's answer. |
void |
terminate(java.lang.String slaveName)
Disconnect from the server, close the socket and return in initial mode. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
protected ConnectionManager connectionManager
protected MessageFormatter formatter
| Constructor Detail |
public UpperProtocol(ConnectionManager connectionManager,
MessageFormatter formatter)
throws java.lang.NullPointerException
connectionManager - Provides a ConnectionManager to this protocol.formatter - Provides a MessageFormatter to this protocol.null.| Method Detail |
public MessageHashtable request(MessageHashtable message)
throws java.lang.NullPointerException,
RequestFailedException,
NotConnectedException,
ConnectionLostException
message - The message to send to the server.null.
public MessageHashtable request(MessageHashtable message,
java.lang.String server)
throws java.lang.NullPointerException,
RequestFailedException,
NotConnectedException,
ConnectionLostException
message - The message to send to the server.server - The targeted server.null.
public MessageHashtable request(MessageHashtable message,
java.lang.String server,
java.lang.String port)
throws java.lang.NullPointerException,
RequestFailedException,
NotConnectedException,
ConnectionLostException
message - The message to send to the server.server - The targeted server.port - The targeted port.null.
public MessageHashtable requestCrypted(MessageHashtable message)
throws java.lang.NullPointerException,
RequestFailedException,
NotConnectedException,
ConnectionLostException
message - The message to send to the server.null.
public MessageHashtable requestCrypted(MessageHashtable message,
java.lang.String server)
throws java.lang.NullPointerException,
RequestFailedException,
NotConnectedException,
ConnectionLostException
message - The message to send to the server.server - The targeted server.null.
public MessageHashtable requestCrypted(MessageHashtable message,
java.lang.String server,
java.lang.String port)
throws java.lang.NullPointerException,
RequestFailedException,
NotConnectedException,
ConnectionLostException
message - The message to send to the server.server - The targeted server.port - The targeted port.null.public final ConnectionManager getConnectionManager()
public final MessageFormatter getMessageFormatter()
public void terminate(java.lang.String slaveName)
protected MessageHashtable makeByeMessage(java.lang.String slaveName)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||