|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjanus.net.ServerBase
janus.net.ProxyServer
public class ProxyServer
Diese Klasse implementiert einen einfachen Echo-Server. Zus&aauml;zlich werden regelmäß UMS-Nachrichten erzeugt.
| Nested Class Summary | |
|---|---|
static class |
ProxyServer.Config
Innere Klasse für die Konfigurationsdaten |
protected static class |
ProxyServer.UmsThread
Eigener UMS-Thread für jede Pool-Connection |
| Field Summary | |
|---|---|
protected boolean |
autorelease
Autorelease-Flag |
protected Connection |
hostConn
Host-Connection (aus Pool) |
| Fields inherited from class janus.net.ServerBase |
|---|
conn, debug, debugStream, exceptionListener, name, replyPending, serverSet, success_hi, success_lo, thread, transaction_type, ums_alias, ums_buffer, ums_length, UMS_MAXLENGTH, ums_reply_len, ums_terminal, umsConn, umsThread, userObject |
| Constructor Summary | |
|---|---|
ProxyServer()
Konstruktor - Setzt den Namen |
|
| Method Summary | |
|---|---|
protected void |
forward()
Reiche eine Nachricht transparent durch. |
protected void |
getNextUms()
Lese die nächste UMS-Nachricht. |
protected void |
handleAccept()
UMS-Verbindungsaufbau |
protected void |
handleAwaitIo()
Warte auf einen NOWAIT-I/O |
protected void |
handleCancel()
Breche einen I/O ab |
protected void |
handleData()
Verarbeite eine eingehende Daten-Nachricht. |
protected void |
handleExit()
Ende des Servers. |
protected void |
handleInit()
Initialisierung. |
protected void |
handleMessage(int message_tag)
Verarbeite eine eingehende Message. |
protected void |
handleTransaction()
Transaktions-Behandlung. |
protected void |
handleUms()
Behandle eine Antwort vom UMS-Client. |
protected void |
handleUmsException(Throwable t)
Behandle eine Exception in der UMS-Kommunikation |
static void |
main(String[] args)
test-Hauptprogramm |
protected void |
releaseConnection()
Gebe die Connection wieder zurück. |
protected void |
reserveConnection()
Hole eine Connection aus dem Pool |
| Methods inherited from class janus.net.ServerBase |
|---|
beginTransaction, endTransaction, getConnection, getDebugStream, getName, getUmsConnection, getUserObject, isDebug, logException, rollbackTransaction, run, sendAck, sendAck, sendError, sendError, sendError, sendReply, sendReply, sendReply, setConnection, setDebug, setDebugStream, setDebugStream, setExceptionListener, setName, setUserObject, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean autorelease
protected Connection hostConn
| Constructor Detail |
|---|
public ProxyServer()
| Method Detail |
|---|
protected void forward()
throws CommException
CommExceptionprotected void getNextUms()
getNextUms in class ServerBase
protected void handleAccept()
throws Exception
handleAccept in class ServerBaseExceptionConnection.acceptNew()
protected void handleAwaitIo()
throws CommException
handleAwaitIo in class ServerBaseCommExceptionServerConnection
protected void handleCancel()
throws CommException
handleCancel in class ServerBaseCommExceptionServerConnection
protected void handleData()
throws CommException
handleData in class ServerBaseCommExceptionServerConnectionprotected void handleExit()
handleExit in class ServerBase
protected void handleInit()
throws Exception
handleInit in class ServerBaseException
protected void handleMessage(int message_tag)
throws Exception
handleMessage in class ServerBasemessage_tag - Nachrichtentyp aus Connection
Exception - Beliebige Ausnahme der Handler
protected void handleTransaction()
throws Exception
handleTransaction in class ServerBaseExceptionprotected void handleUms()
handleUms in class ServerBaseprotected void handleUmsException(Throwable t)
handleUmsException in class ServerBase
public static void main(String[] args)
throws Exception
Exceptionprotected void releaseConnection()
protected void reserveConnection()
throws CommException
CommException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||