|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object janus.net.Connection janus.net.ServerConnection
public class ServerConnection
Diese Klasse ergänzt Connection
um Serverfunktionen.
Field Summary |
---|
Constructor Summary | |
---|---|
ServerConnection(Socket socket,
String text,
PrintWriter stream)
Konstruktor für eingehende Verbindungen |
Method Summary | |
---|---|
void |
cloneState(Connection conn)
Kopieren des internen Status einer anderen Verbindung. |
void |
receiveBuffer()
Empfangen der Antwort in io_buffer. |
int |
receiveMessage(byte[] buffer,
int offset,
int len)
Nachricht von Client. |
int |
receiveMessage(MessageElement msg)
Nachricht von Client. |
void |
sendAck()
Positive Quittung |
void |
sendAck(String text)
Positive Quittung mit Text |
protected void |
sendError(int error_code,
int subsystem,
int subsystem_error,
int extended_error,
int error_class,
String text)
Fehlerantwort |
void |
sendError(int error_code,
String text)
Fehlerantwort |
void |
sendError(String text)
Fehlerantwort |
void |
sendReply(byte[] buffer,
int offset,
int len)
Antwort an Client. |
void |
sendReply(MessageElement reply)
Antwort an Client. |
void |
sendReply(MessageElement reply,
int len)
Antwort an Client. |
void |
setNowait(boolean nowait)
Setze den Nowaitstatus |
void |
setTransaction(boolean transaction)
Setze den Transaktionsstatus |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ServerConnection(Socket socket, String text, PrintWriter stream) throws CommException, TandemException
socket
- Bereits verbundener Sockettext
- Antworttext für INIT-Nachricht.
Wenn null
, wird die Antwort nicht gesendetstream
- PrintWriter für Debugging
CommException
- Allgemeiner Kommunikationsfehler
TandemException
- Tandem-FehlerServerConnection
Method Detail |
---|
public void cloneState(Connection conn)
conn
- Quelle der Daten (normalerweise aus einem ConnectionPool)public void receiveBuffer() throws CommException, TandemException
receiveBuffer
in class Connection
CommException
- Allgemeiner Kommunikationsfehler
TandemException
- Tandem-Fehlerpublic int receiveMessage(byte[] buffer, int offset, int len) throws CommException, TandemException
buffer
- Nachrichtenpufferoffset
- Offset innerhalb des Pufferslen
- Länge der Nachricht
CommException
- Allgemeiner Kommunikationsfehler
TandemException
- Tandem-Fehlerpublic int receiveMessage(MessageElement msg) throws CommException, TandemException
msg
- Nachricht
CommException
- Allgemeiner Kommunikationsfehler
TandemException
- Tandem-Fehlerpublic void sendAck() throws CommException
CommException
- Allgemeiner Kommunikationsfehlerpublic void sendAck(String text) throws CommException
text
- Informationsnachricht
CommException
- Allgemeiner Kommunikationsfehlerprotected void sendError(int error_code, int subsystem, int subsystem_error, int extended_error, int error_class, String text) throws CommException
error_code
- Fehlercodesubsystem
- Subsystemsubsystem_error
- Subsystem-Fehlercodeextended_error
- erweiterter Fehlercode
qparam error_class Fehlerklassetext
- Fehlermeldung
CommException
- Allgemeiner KommunikationsfehlerTandemException
public void sendError(int error_code, String text) throws CommException
error_code
- Fehlercodetext
- Fehlermeldung
CommException
- Allgemeiner Kommunikationsfehlerpublic void sendError(String text) throws CommException
text
- Fehlermeldung
CommException
- Allgemeiner Kommunikationsfehlerpublic void sendReply(byte[] buffer, int offset, int len) throws CommException
buffer
- Antwort-Pufferoffset
- Offset innerhalb des Pufferslen
- Länge der Antwort
CommException
- Allgemeiner Kommunikationsfehlerpublic void sendReply(MessageElement reply) throws CommException
reply
- Antwort
CommException
- Allgemeiner Kommunikationsfehlerpublic void sendReply(MessageElement reply, int len) throws CommException
reply
- Antwortlen
- Länge der Antwort
CommException
- Allgemeiner Kommunikationsfehlerpublic void setNowait(boolean nowait)
public void setTransaction(boolean transaction)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |