Raveler - Gather plugins from Plugins directory (specified by the RAVELPATH) and instantiates each one and calls their initialize method - Load users - *LOAD PERMANENT VIRTUAL URLS FROM DISK* - done - *FIRST TIME - CREATE FILE CONTAINING THE RAVELER-SPECIFIC DEFAULT VURLS* - done - put users and passwords the user_pass hashtable - create RavelerUser objects for each user and put in currentUsers hash - load their preferences into preferences hash from username.dat file - if not username.dat file exist - create one and load the default attributes for plugins - Start up the ProxyServerManager (PROXYPORT, RAVELPORT, ravel) - Start up the RavelerManager (ravelerSocket, RAVELPORT, ravel) ProxyServerManager - sleep (to let the Raveler server get bound) - loop, spawning ProxyServer(proxySocket,ravelPort,counter++,ravel) threads on incoming connections ProxyServer - read in the request headers as a String - construct an HTTPRequest object for this request - if the request didn't generate an exception when it was constructed, check for the proxy-authorization header. - if the proxy-authorization header isn't there, *GET THE USERREALM FROM THE USERATTRIBUTES HASH*, send back a proxy-authenticate response and close the connection - else, try to get the credentials from the user - if the credentials match our userPass hash, continue - else, return another proxy-authenticate response and close the connection - * IF THE REQUESTED URL IS A VIRTUAL URL, GET THE VURL OBJECT FROM THE VURL HASH, CONSTRUCT THE RESPONSE WITH ITS RESOLVEVURL METHOD, AND SEND THE RESPONSE BACK TO THE CLIENT * - done - ELSE send the request object to RavelerManager - send the username to RavelerManager - read in the response from RavelerManager - if there was some error getting the response, send an error message back to the client - otherwise, just send the response back to the client. RavelerManager: - construct a HTTPRequest in order to run the proxy server. - read in the request from the Proxy Server - get the username information from the proxy after he/she has been authenticated - *SEND THE REQUEST TO THE ACTIVE PLUGINS FOR THE USER IN THE SPECIFIED SEQUENCE* - done - *DETERMINE WHICH PLUGINS SHOULD RECIEVE THE REQUEST ACCORDING TO WHICH MIME TYPES THEY SUPPORT AND CALL THE EXECUTE METHOD FOR THE SELECTED PLUGINS* - done - execute the plugins on the request according to the user's preferences request = plugin.execute(request,(Hashtable) currentUser.preferences.get(plugin.name)); - forward the request to the proxy client then to the Web browser - get the response from the proxy client (response = client.getResponse();) -checks for valid responses else write out the error page which is a string errorEntity.write(errorPage.getBytes()); - *SEND THE RESPONSE TO THE ACTIVE PLUGINS FOR THE USER IN THE SPECIFIED SEQUENCE* - done - *DETERMINE WHICH PLUGINS SHOULD RECIEVE THE RESPONSE ACCORDING TO WHICH MIME TYPES THEY SUPPORT AND CALL THE EXECUTE METHOD FOR THE SELECTED PLUGINS* - done - execute the plugins on the responses according to the user's preferences response = plugin.execute(response,(Hashtable) currentUser.preferences.get(plugin.name)); - *INSERT THE RAVELER BANNER AT THE TOP* - done - send the response to Proxy Server LOGGING OUT - done - VURL = webraveler2.config.userconfig/logout - RESOLVEVRL METHOD - USERREALM = "Web Raveler " + counter++; - UPDATE USERATTRIBUTES HASH - SAVE USER'S ATTRIBUTES TO DISK - EXCLUDING THE USERREALM - done CONFIGURATION - ALLOW USER TO CONFIGURE - ACTIVE PLUGINS - done - INSTALLED PLUGINS - PLUGIN SEQUENCE - CHANGE PASSWORD UNRAVELING OF PAGE RAVELER STYLESHEET/RAVELERBANNER/USER INTERFACE API METHODS