Class RapidoidHttpServerImplementation
- java.lang.Object
-
- org.rapidoid.RapidoidThing
-
- org.rapidoid.http.AbstractHttpServer
-
- net.officefloor.server.http.rapidoid.RapidoidHttpServerImplementation
-
- All Implemented Interfaces:
OfficeFloorListener
,HttpServerImplementation
,org.rapidoid.net.Protocol
,org.rapidoid.util.Constants
public class RapidoidHttpServerImplementation extends org.rapidoid.http.AbstractHttpServer implements HttpServerImplementation, OfficeFloorListener
RapidoidHttpServerImplementation
.- Author:
- Daniel Sagenschneider
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SYSTEM_PROPERTY_CORE_BUFFER_POOL_MAX_SIZE
Name ofSystem
property to obtain the maximumThreadLocalStreamBufferPool
core pool size.static java.lang.String
SYSTEM_PROPERTY_STREAM_BUFFER_SIZE
Name ofSystem
property to obtain the pooledStreamBuffer
size.static java.lang.String
SYSTEM_PROPERTY_THREADLOCAL_BUFFER_POOL_MAX_SIZE
-
Fields inherited from class org.rapidoid.http.AbstractHttpServer
CONN_CLOSE_HDR, CONTENT_LENGTH_TXT, CONTENT_TYPE_TXT, DATE_TXT, HTTP_404, HTTP_500, HTTP_PARSER, SERVER_HDR, STATUS_200
-
Fields inherited from interface org.rapidoid.util.Constants
AMP, ANY, ASTERISK, BYTE_0, COL, CR, CR_, CR_LF, CR_LF_CR_LF, DELETE, EMPTY_ARRAY, EMPTY_STRING_ARRAY, EQ, F, GET, GET_OR_POST, HEAD, HTTP_VERBS, LAST_6, LF, LF_, LF_LF, MALFORMED_CHAR, NOT_FOUND, OPTIONS, PATCH, POST, PUT, SEMI_COL, SEPARATOR_LINE, SPACE, SPACE_, T, TRACE, UTF8_2_BYTES_LEAD, UTF8_3_BYTES_LEAD, UTF8_4_BYTES_LEAD, UTF8_CONTINUATION
-
-
Constructor Summary
Constructors Constructor Description RapidoidHttpServerImplementation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configureHttpServer(HttpServerImplementationContext context)
Configures theHttpServer
.protected org.rapidoid.http.HttpStatus
handle(org.rapidoid.net.abstracts.Channel ctx, org.rapidoid.buffer.Buf buf, org.rapidoid.net.impl.RapidoidHelper data)
void
officeFloorClosed(OfficeFloorEvent event)
Notifies that theOfficeFloor
has been closed.void
officeFloorOpened(OfficeFloorEvent event)
Notifies that theOfficeFloor
has been opened.
-
-
-
Field Detail
-
SYSTEM_PROPERTY_STREAM_BUFFER_SIZE
public static final java.lang.String SYSTEM_PROPERTY_STREAM_BUFFER_SIZE
Name ofSystem
property to obtain the pooledStreamBuffer
size.- See Also:
- Constant Field Values
-
SYSTEM_PROPERTY_THREADLOCAL_BUFFER_POOL_MAX_SIZE
public static final java.lang.String SYSTEM_PROPERTY_THREADLOCAL_BUFFER_POOL_MAX_SIZE
- See Also:
- Constant Field Values
-
SYSTEM_PROPERTY_CORE_BUFFER_POOL_MAX_SIZE
public static final java.lang.String SYSTEM_PROPERTY_CORE_BUFFER_POOL_MAX_SIZE
Name ofSystem
property to obtain the maximumThreadLocalStreamBufferPool
core pool size.- See Also:
- Constant Field Values
-
-
Method Detail
-
configureHttpServer
public void configureHttpServer(HttpServerImplementationContext context)
Description copied from interface:HttpServerImplementation
Configures theHttpServer
.- Specified by:
configureHttpServer
in interfaceHttpServerImplementation
- Parameters:
context
-HttpServerImplementationContext
.
-
officeFloorOpened
public void officeFloorOpened(OfficeFloorEvent event) throws java.lang.Exception
Description copied from interface:OfficeFloorListener
Notifies that theOfficeFloor
has been opened.- Specified by:
officeFloorOpened
in interfaceOfficeFloorListener
- Parameters:
event
-OfficeFloorEvent
.- Throws:
java.lang.Exception
- If fails to handle open listen logic.
-
officeFloorClosed
public void officeFloorClosed(OfficeFloorEvent event) throws java.lang.Exception
Description copied from interface:OfficeFloorListener
Notifies that theOfficeFloor
has been closed.- Specified by:
officeFloorClosed
in interfaceOfficeFloorListener
- Parameters:
event
-OfficeFloorEvent
.- Throws:
java.lang.Exception
- If fails to handle close listen logic.
-
handle
protected org.rapidoid.http.HttpStatus handle(org.rapidoid.net.abstracts.Channel ctx, org.rapidoid.buffer.Buf buf, org.rapidoid.net.impl.RapidoidHelper data)
- Specified by:
handle
in classorg.rapidoid.http.AbstractHttpServer
-
-