amber.server.manager
Interface ConnectionHandler
- All Known Implementing Classes:
- ApplicationManager
- public interface ConnectionHandler
This interface is used by classes which are capable of handling one or more
types of incoming connections. The types include browser, application and
device connections.
- Version:
- 1.0.0
- Author:
- Dr. David J. Knowles
- See Also:
Core,
ListenerThread,
ConnectionManager
handleNewConnection
public void handleNewConnection(java.net.Socket socket,
Packet initPacket,
int systemType,
int type)
throws java.io.IOException,
ApplicationException
- This function matches the incomimg packet to the corresponding page handler in
the pendingPages variable.
A match is activated and placed in the activePages vector.
If there is no match the link is dropped and the packet is ignored.
- Parameters:
socket - Socket of the incoming connection.initPacket - The Packet which is first sent by the page when the connection is opened.systemType - The type of remote system which is attempting to connect.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.ApplicationException - containing application errors.
init
public void init(Core parentServer,
int port,
DatabaseManager manager,
ConnectionPool connectionPool,
PropertiesHandler properties,
Log logFile)
- This function is used to initialise the handler.
This is used when the class is instatiated dynamically using loadInstance.
- Parameters:
parentServer - Core base server object.port - The port number to use for incoming normal connections.securePort - The port number to use for incoming secure connections.adminPort - The port number to use for incoming administration connections.manager - Database manager class which handles database requirements.connectionPool - The connection pool object which relates to the amber database tables.properties - PropertiesHandler for the server properties file.logFile - Log object which is used to log messages.
Copyright © 2002 Clearfield Research Ltd. All Rights Reserved.