janus.net
Class ProxyServer.UmsThread

java.lang.Object
  extended by java.lang.Thread
      extended by janus.net.ProxyServer.UmsThread
All Implemented Interfaces:
Runnable
Enclosing class:
ProxyServer

protected static class ProxyServer.UmsThread
extends Thread

Eigener UMS-Thread für jede Pool-Connection


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
protected  byte[] buffer
          Datenpuffer
protected  ServerConnection conn
          Connection
protected  Throwable exception
          Exception
protected  int length
          Datenlänge
protected  int reply_length
          Maximale Antwortlänge
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ProxyServer.UmsThread(ServerConnection conn)
          Konstruktor - setzt die Connection
 
Method Summary
 String getAlias()
          Ermittle das Ziel der UMS: Alias
 int getReplyLength()
          Ermittle die Maximale Antwortlänge
 String getTerminal()
          Ermittle das Ziel der UMS: Terminal
 int read(byte[] msg, int offset, int max_length)
          Lese Daten aus dem Puffer (blockiert)
 void run()
          Thread-Code
 void setException(Throwable exception)
          Setze die Exception
 void write(byte[] msg, int offset, int length)
          Schreibe die Antwort in den Puffer.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

buffer

protected byte[] buffer
Datenpuffer


conn

protected ServerConnection conn
Connection


exception

protected Throwable exception
Exception


length

protected int length
Datenlänge


reply_length

protected int reply_length
Maximale Antwortlänge

Constructor Detail

ProxyServer.UmsThread

public ProxyServer.UmsThread(ServerConnection conn)
Konstruktor - setzt die Connection

Method Detail

getAlias

public String getAlias()
Ermittle das Ziel der UMS: Alias


getReplyLength

public int getReplyLength()
Ermittle die Maximale Antwortlänge


getTerminal

public String getTerminal()
Ermittle das Ziel der UMS: Terminal


read

public int read(byte[] msg,
                int offset,
                int max_length)
         throws InterruptedException
Lese Daten aus dem Puffer (blockiert)

Parameters:
msg - Datenpuffer
offset - Offset innerhalb des Puffers
max_length - Maximal zu lesende Bytes
Returns:
Anzahl der gelesenen Bytes
Throws:
InterruptedException

run

public void run()
Thread-Code

Specified by:
run in interface Runnable
Overrides:
run in class Thread

setException

public void setException(Throwable exception)
Setze die Exception


write

public void write(byte[] msg,
                  int offset,
                  int length)
Schreibe die Antwort in den Puffer.

Parameters:
msg - Datenpuffer
offset - Offset innerhalb des Puffers
length - Anzahl der Bytes


Copyright © 2008 MvC Systemsoftware.