amber.server.manager.handler
Class Browser

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--amber.server.manager.handler.BaseHandler
              |
              +--amber.server.manager.handler.Browser
All Implemented Interfaces:
HandlerInterface, java.lang.Runnable

public class Browser
extends BaseHandler
implements HandlerInterface

This class handles the connection requirements for the particular incoming connection. This class handles the standard browser based applet system.

See Also:
Core, HandlerInterface

Fields inherited from class amber.server.manager.handler.BaseHandler
dataDecoder, dataEncoder, encoderBytes, initPacket, loggingFile, mainServer, socket, type
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Browser()
           
 
Method Summary
 ApplicationManager getApplicationManager()
          Returns the parent application manager for this object.
protected  void performInitialConnection(java.net.Socket socket, Packet initPacket, AmberInputStream dataDecoder, int type)
          This function handles the connection requirements for new incoming connections.
protected  void performReconnection(java.net.Socket socket, Packet initPacket, AmberInputStream dataDecoder, int type)
          This function handles the connection requirements for a connection which was lost.
 void run()
          This function handles the connection requirements for the specified incoming connection.
 void setApplicationManager(ApplicationManager manager)
          Sets the parent application manager for this object.
 
Methods inherited from class amber.server.manager.handler.BaseHandler
connectToClient, sendPacket, setCore, setLogger
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, 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
 
Methods inherited from interface amber.server.manager.handler.HandlerInterface
connectToClient, setCore, setLogger
 

Constructor Detail

Browser

public Browser()
Method Detail

setApplicationManager

public void setApplicationManager(ApplicationManager manager)
Sets the parent application manager for this object.
Parameters:
manager - ApplicationManager which is the parent manager.

getApplicationManager

public ApplicationManager getApplicationManager()
Returns the parent application manager for this object.
Returns:
ApplicationManager which is the parent manager.

run

public void run()
This function handles the connection requirements for the specified incoming connection. This is a one-shot thread which terminates once connection is complete. In this case the connection is from a Browser based system. The required variables have been set in the prior connectToClient function.
Overrides:
run in class java.lang.Thread

performInitialConnection

protected void performInitialConnection(java.net.Socket socket,
                                        Packet initPacket,
                                        AmberInputStream dataDecoder,
                                        int type)
                                 throws java.io.IOException
This function handles the connection requirements for new incoming connections. In this case the connection is from a Browser based system.
Parameters:
socket - Socket of the incoming connection.
initPacket - The Packet which is first sent by the page when the connection is opened.
dataDecoder - AmberInputStream with the packet parameters.
type - The type of connection that is attempting to match the packet. This matches the constants in ListenerThread.
Throws:
java.io.IOException - containing decoding errors.

performReconnection

protected void performReconnection(java.net.Socket socket,
                                   Packet initPacket,
                                   AmberInputStream dataDecoder,
                                   int type)
                            throws java.io.IOException
This function handles the connection requirements for a connection which was lost. In this case the connection is from a Browser based system.
Parameters:
socket - Socket of the incoming connection.
initPacket - The Packet which is first sent by the page when the connection is opened.
dataDecoder - AmberInputStream with the packet parameters.
type - The type of connection that is attempting to match the packet. This matches the constants in ListenerThread.
Throws:
java.io.IOException - containing decoding errors.


Copyright © 2002 Clearfield Research Ltd. All Rights Reserved.