xmlBlaster 2.2.0 API

org.xmlBlaster.contrib.socketgetter
Class SocketConnectorThread

java.lang.Object
  extended by java.lang.Thread
      extended by org.xmlBlaster.contrib.socketgetter.SocketConnectorThread
All Implemented Interfaces:
java.lang.Runnable

 class SocketConnectorThread
extends java.lang.Thread

The socket thread which handles a single request from a client.
The socket-thread answers one get request and closes the connection right after the request has been answered.
The request must start with get otherwise no message will be delivered.

Author:
Heinrich Götzger

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  I_XmlBlasterAccess connection
          The connection to the xmlBlaster server.
private  Global glob
          The user global.
private static java.util.logging.Logger log
          Holds the logger for this class.
private  java.net.Socket socket
          The actual socket.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SocketConnectorThread(Global glob, I_XmlBlasterAccess connection, java.net.Socket socket)
          Creates the thread.
 
Method Summary
private static java.lang.String getOID(java.net.Socket socket)
          Extract the oid from the given request out of the clients socket input stream.
 void run()
          Starts the actual thread.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

private static java.util.logging.Logger log
Holds the logger for this class.


socket

private java.net.Socket socket
The actual socket.


glob

private Global glob
The user global.


connection

private I_XmlBlasterAccess connection
The connection to the xmlBlaster server.

Constructor Detail

SocketConnectorThread

public SocketConnectorThread(Global glob,
                             I_XmlBlasterAccess connection,
                             java.net.Socket socket)
Creates the thread.

Parameters:
glob - the user global
connection - the connection to the xmlBlaster server.
socket - the accepted socket for tha actual (telnet) client.
Method Detail

run

public void run()
Starts the actual thread.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

getOID

private static final java.lang.String getOID(java.net.Socket socket)
Extract the oid from the given request out of the clients socket input stream. The request must start with get otherwise null will be returned.

Returns:
An oid or null, if no oid was given.

xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.