SlideShare a Scribd company logo
1 of 1
Download to read offline
Web Server Project
Class Diagram Proposal (v1.2)
BadRequest
Exception
Thread
Request
- uri : String
- body : ?
- verb : String
- httpVersion : String
- headers : Dictionary
+ Request( test : String )
+ Request( client : Stream )
+ parse() : void
+ accessors
ConfigurationReader
- file : File
+ ConfigurationReader( fileName: String )
+ hasMoreLines() : boolean
+ nextLine() : String
+ load() : void
HttpdConf
- aliases : Dictionary
- scriptAliases : Dictionary
- etc
+ HttpdConf( fileName :
String )
+ load() : void
MimeTypes
- types : Dictionary
+ MimeTypes( fileName :
String )
+ load() : void
+ lookup( extension : String ) :
String
Server
- configuration : HttpdConf
- mimeTypes : MimeTypes
- socket : ServerSocket
- accessFiles : Dictionary
+ start() : void
Resource
+ Resource( uri : String, config :
HttpdConf )
+ absolutePath() : String
+ isScript() : boolean
+ isProtected() : boolean
Response
+ code : integer
+ reasonPhrase : String
+ resource : Resource
+ Response( resource : Resource )
+ send( out : OutputStream )
Htaccess
- userFile : Htpassword
- authType : String
- authName : String
- require : String
+ load() : void
+ isAuthorized( username : String,
password : String ) : boolean
Htpassword
- users : Dictionary
+ load() : void
+ isAuthorized( username : String,
password : String ) : boolean
Worker
- client : Socket
- mimes : MimeTypes
- config : HttpdConf
+ Worker( socket : Socket, config :
HttpdConf, mimes : MimeTypes )
+ run()
Logger
- file : File
+ Logger( fileName : String )
+ write( request : Request, response :
Response )
ResponseFactory
+ getResponse( request : Request,
resource : Resource ) : Response

More Related Content

What's hot

Mac os file managment
Mac os  file managmentMac os  file managment
Mac os file managmentAndam Omar
 
Owncloud - cloud solution for SME
Owncloud - cloud solution for SMEOwncloud - cloud solution for SME
Owncloud - cloud solution for SMEMichael Phan
 
91684060 356-cau-trắc-nghiệm-csdl-2
91684060 356-cau-trắc-nghiệm-csdl-291684060 356-cau-trắc-nghiệm-csdl-2
91684060 356-cau-trắc-nghiệm-csdl-2tranquanthien
 
Bai07 bo nho
Bai07   bo nhoBai07   bo nho
Bai07 bo nhoVũ Sang
 
Slide Hệ Quản Trị Cơ sở dữ liệu - CHƯƠNG 4
Slide Hệ Quản Trị Cơ sở dữ liệu - CHƯƠNG 4Slide Hệ Quản Trị Cơ sở dữ liệu - CHƯƠNG 4
Slide Hệ Quản Trị Cơ sở dữ liệu - CHƯƠNG 4pisu412
 
Hadoop - Hệ thống tính toán và xử lý dữ liệu lớn
Hadoop - Hệ thống tính toán và xử lý dữ liệu lớnHadoop - Hệ thống tính toán và xử lý dữ liệu lớn
Hadoop - Hệ thống tính toán và xử lý dữ liệu lớnThành Thư Thái
 
Slide Hệ Quản Trị Cơ sở dữ liệu - CHƯƠNG 1
Slide Hệ Quản Trị Cơ sở dữ liệu - CHƯƠNG 1Slide Hệ Quản Trị Cơ sở dữ liệu - CHƯƠNG 1
Slide Hệ Quản Trị Cơ sở dữ liệu - CHƯƠNG 1pisu412
 
lý thuyết cơ sở dữ liệu phân tán
lý thuyết cơ sở dữ liệu phân tánlý thuyết cơ sở dữ liệu phân tán
lý thuyết cơ sở dữ liệu phân tánNgo Trung
 
2 08 client-server architecture
2 08 client-server architecture2 08 client-server architecture
2 08 client-server architecturejit_123
 
Database , 8 Query Optimization
Database , 8 Query OptimizationDatabase , 8 Query Optimization
Database , 8 Query OptimizationAli Usman
 
Hệ điều hành (chương 1)
Hệ điều hành (chương 1)Hệ điều hành (chương 1)
Hệ điều hành (chương 1)realpotter
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed SystemsRupsee
 
Active directory
Active directory Active directory
Active directory deshvikas
 
Introduction to system
Introduction to systemIntroduction to system
Introduction to systemPravinGhosekar
 
Lesson 5: Information Systems Presentation
Lesson 5: Information Systems PresentationLesson 5: Information Systems Presentation
Lesson 5: Information Systems PresentationKereen Tatham
 

What's hot (20)

Mac os file managment
Mac os  file managmentMac os  file managment
Mac os file managment
 
Owncloud - cloud solution for SME
Owncloud - cloud solution for SMEOwncloud - cloud solution for SME
Owncloud - cloud solution for SME
 
Network operating system
Network operating systemNetwork operating system
Network operating system
 
91684060 356-cau-trắc-nghiệm-csdl-2
91684060 356-cau-trắc-nghiệm-csdl-291684060 356-cau-trắc-nghiệm-csdl-2
91684060 356-cau-trắc-nghiệm-csdl-2
 
Bai07 bo nho
Bai07   bo nhoBai07   bo nho
Bai07 bo nho
 
Slide Hệ Quản Trị Cơ sở dữ liệu - CHƯƠNG 4
Slide Hệ Quản Trị Cơ sở dữ liệu - CHƯƠNG 4Slide Hệ Quản Trị Cơ sở dữ liệu - CHƯƠNG 4
Slide Hệ Quản Trị Cơ sở dữ liệu - CHƯƠNG 4
 
Hadoop - Hệ thống tính toán và xử lý dữ liệu lớn
Hadoop - Hệ thống tính toán và xử lý dữ liệu lớnHadoop - Hệ thống tính toán và xử lý dữ liệu lớn
Hadoop - Hệ thống tính toán và xử lý dữ liệu lớn
 
Slide Hệ Quản Trị Cơ sở dữ liệu - CHƯƠNG 1
Slide Hệ Quản Trị Cơ sở dữ liệu - CHƯƠNG 1Slide Hệ Quản Trị Cơ sở dữ liệu - CHƯƠNG 1
Slide Hệ Quản Trị Cơ sở dữ liệu - CHƯƠNG 1
 
lý thuyết cơ sở dữ liệu phân tán
lý thuyết cơ sở dữ liệu phân tánlý thuyết cơ sở dữ liệu phân tán
lý thuyết cơ sở dữ liệu phân tán
 
Database systems introduction
Database systems introductionDatabase systems introduction
Database systems introduction
 
2 08 client-server architecture
2 08 client-server architecture2 08 client-server architecture
2 08 client-server architecture
 
File sharing
File sharingFile sharing
File sharing
 
Virtualization
VirtualizationVirtualization
Virtualization
 
Database , 8 Query Optimization
Database , 8 Query OptimizationDatabase , 8 Query Optimization
Database , 8 Query Optimization
 
Hệ điều hành (chương 1)
Hệ điều hành (chương 1)Hệ điều hành (chương 1)
Hệ điều hành (chương 1)
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systems
 
Active directory
Active directory Active directory
Active directory
 
Introduction to system
Introduction to systemIntroduction to system
Introduction to system
 
Ext filesystem4
Ext filesystem4Ext filesystem4
Ext filesystem4
 
Lesson 5: Information Systems Presentation
Lesson 5: Information Systems PresentationLesson 5: Information Systems Presentation
Lesson 5: Information Systems Presentation
 

Web server class diagram

  • 1. Web Server Project Class Diagram Proposal (v1.2) BadRequest Exception Thread Request - uri : String - body : ? - verb : String - httpVersion : String - headers : Dictionary + Request( test : String ) + Request( client : Stream ) + parse() : void + accessors ConfigurationReader - file : File + ConfigurationReader( fileName: String ) + hasMoreLines() : boolean + nextLine() : String + load() : void HttpdConf - aliases : Dictionary - scriptAliases : Dictionary - etc + HttpdConf( fileName : String ) + load() : void MimeTypes - types : Dictionary + MimeTypes( fileName : String ) + load() : void + lookup( extension : String ) : String Server - configuration : HttpdConf - mimeTypes : MimeTypes - socket : ServerSocket - accessFiles : Dictionary + start() : void Resource + Resource( uri : String, config : HttpdConf ) + absolutePath() : String + isScript() : boolean + isProtected() : boolean Response + code : integer + reasonPhrase : String + resource : Resource + Response( resource : Resource ) + send( out : OutputStream ) Htaccess - userFile : Htpassword - authType : String - authName : String - require : String + load() : void + isAuthorized( username : String, password : String ) : boolean Htpassword - users : Dictionary + load() : void + isAuthorized( username : String, password : String ) : boolean Worker - client : Socket - mimes : MimeTypes - config : HttpdConf + Worker( socket : Socket, config : HttpdConf, mimes : MimeTypes ) + run() Logger - file : File + Logger( fileName : String ) + write( request : Request, response : Response ) ResponseFactory + getResponse( request : Request, resource : Resource ) : Response