java.lang.Object
org.refcodes.web.AbstractHttpRequest
org.refcodes.web.HttpServerRequest
org.refcodes.rest.RestRequestEvent
- All Implemented Interfaces:
org.refcodes.mixin.ActionAccessor<org.refcodes.web.HttpMethod>
,org.refcodes.mixin.Dumpable
,org.refcodes.mixin.SourceAccessor<RestServer>
,org.refcodes.mixin.WildcardSubstitutes
,org.refcodes.observer.GenericActionEvent<org.refcodes.web.HttpMethod,
,RestServer> org.refcodes.observer.GenericEvent<RestServer>
,org.refcodes.web.HeaderFieldsAccessor<org.refcodes.web.RequestHeaderFields>
,org.refcodes.web.HttpBodyAccessor
,org.refcodes.web.HttpInputStreamAccessor
,org.refcodes.web.HttpMethodAccessor
,org.refcodes.web.HttpRequest
,org.refcodes.web.LocalAddressAccessor
,org.refcodes.web.RealmAccessor
,org.refcodes.web.RemoteAddressAccessor
,org.refcodes.web.UrlAccessor
public class RestRequestEvent
extends org.refcodes.web.HttpServerRequest
implements org.refcodes.observer.GenericActionEvent<org.refcodes.web.HttpMethod,RestServer>, org.refcodes.mixin.WildcardSubstitutes, org.refcodes.web.RemoteAddressAccessor, org.refcodes.web.LocalAddressAccessor, org.refcodes.web.RealmAccessor, org.refcodes.mixin.Dumpable
Defines a
RestRequestEvent
being the request as consumed by a
RestEndpoint
. Usually you will use
RestServer.onRequest(HttpMethod, String, RestRequestConsumer)
for
registering a RestRequestConsumer
to the RestServer
(
HttpRestServer
).-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.mixin.ActionAccessor
org.refcodes.mixin.ActionAccessor.ActionBuilder<A extends Object,
B extends org.refcodes.mixin.ActionAccessor.ActionBuilder<A, B>>, org.refcodes.mixin.ActionAccessor.ActionMutator<A extends Object>, org.refcodes.mixin.ActionAccessor.ActionProperty<A extends Object> Nested classes/interfaces inherited from interface org.refcodes.web.HeaderFieldsAccessor
org.refcodes.web.HeaderFieldsAccessor.HeaderFieldsBuilder<T extends org.refcodes.web.HeaderFields<?,
?>, B extends org.refcodes.web.HeaderFieldsAccessor.HeaderFieldsBuilder<T, B>>, org.refcodes.web.HeaderFieldsAccessor.HeaderFieldsMutator<T extends org.refcodes.web.HeaderFields<?, ?>>, org.refcodes.web.HeaderFieldsAccessor.HeaderFieldsProperty<T extends org.refcodes.web.HeaderFields<?, ?>> Nested classes/interfaces inherited from interface org.refcodes.web.HttpBodyAccessor
org.refcodes.web.HttpBodyAccessor.HttpBodyBuilder<B extends org.refcodes.web.HttpBodyAccessor.HttpBodyBuilder<B>>, org.refcodes.web.HttpBodyAccessor.HttpBodyMutator, org.refcodes.web.HttpBodyAccessor.HttpBodyProperty, org.refcodes.web.HttpBodyAccessor.HttpBodyProvider<EXC extends Exception>
Nested classes/interfaces inherited from interface org.refcodes.web.HttpInputStreamAccessor
org.refcodes.web.HttpInputStreamAccessor.HttpInputStreamBuilder<B extends org.refcodes.web.HttpInputStreamAccessor.HttpInputStreamBuilder<B>>, org.refcodes.web.HttpInputStreamAccessor.HttpInputStreamMutator, org.refcodes.web.HttpInputStreamAccessor.HttpInputStreamProperty, org.refcodes.web.HttpInputStreamAccessor.HttpInputStreamProvider<EXC extends Exception>
Nested classes/interfaces inherited from interface org.refcodes.web.HttpMethodAccessor
org.refcodes.web.HttpMethodAccessor.HttpMethodBuilder<B extends org.refcodes.web.HttpMethodAccessor.HttpMethodBuilder<B>>, org.refcodes.web.HttpMethodAccessor.HttpMethodMutator, org.refcodes.web.HttpMethodAccessor.HttpMethodProperty
Nested classes/interfaces inherited from interface org.refcodes.web.LocalAddressAccessor
org.refcodes.web.LocalAddressAccessor.LocalAddressBuilder<B extends org.refcodes.web.LocalAddressAccessor.LocalAddressBuilder<B>>, org.refcodes.web.LocalAddressAccessor.LocalAddressMutator, org.refcodes.web.LocalAddressAccessor.LocalAddressProperty
Nested classes/interfaces inherited from interface org.refcodes.web.RealmAccessor
org.refcodes.web.RealmAccessor.RealmBuilder<B extends org.refcodes.web.RealmAccessor.RealmBuilder<B>>, org.refcodes.web.RealmAccessor.RealmMutator, org.refcodes.web.RealmAccessor.RealmProperty
Nested classes/interfaces inherited from interface org.refcodes.web.RemoteAddressAccessor
org.refcodes.web.RemoteAddressAccessor.RemoteAddressBuilder<B extends org.refcodes.web.RemoteAddressAccessor.RemoteAddressBuilder<B>>, org.refcodes.web.RemoteAddressAccessor.RemoteAddressMutator, org.refcodes.web.RemoteAddressAccessor.RemoteAddressProperty
Nested classes/interfaces inherited from interface org.refcodes.mixin.SourceAccessor
org.refcodes.mixin.SourceAccessor.SourceMutator<SRC extends Object>, org.refcodes.mixin.SourceAccessor.SourceProperty<SRC extends Object>
Nested classes/interfaces inherited from interface org.refcodes.web.UrlAccessor
org.refcodes.web.UrlAccessor.UrlBuilder, org.refcodes.web.UrlAccessor.UrlMutator, org.refcodes.web.UrlAccessor.UrlProperty
-
Field Summary
Fields inherited from class org.refcodes.web.HttpServerRequest
_mediaTypeFactoryLookup
Fields inherited from class org.refcodes.web.AbstractHttpRequest
_headerFields, _httpMethod, _url
-
Constructor Summary
ConstructorDescriptionRestRequestEvent
(InetSocketAddress aLocalAddress, InetSocketAddress aRemoteAddress, org.refcodes.web.HttpMethod aHttpMethod, org.refcodes.web.Url aUrl, org.refcodes.mixin.WildcardSubstitutes aWildcardSubstitutes, org.refcodes.web.RequestHeaderFields aHeaderFields, InputStream aHttpInputStream, RestServer aRestServer) Constructs aRestRequestEvent
with all required attributes. -
Method Summary
Modifier and TypeMethodDescriptionorg.refcodes.web.HttpMethod
getRealm()
String[]
getWildcardReplacement
(String aWildcardName) getWildcardReplacementAt
(int aIndex) String[]
String[]
getWildcardReplacements
(String... aWildcardNames) String[]
getWildcardReplacementsAt
(int... aIndexes) Methods inherited from class org.refcodes.web.HttpServerRequest
getHttpBody, getHttpInputStream, getRequest, getRequest, toString
Methods inherited from class org.refcodes.web.AbstractHttpRequest
getHeaderFields, getHttpMethod, getUrl
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.refcodes.mixin.Dumpable
toDump, toDump
Methods inherited from interface org.refcodes.web.HeaderFieldsAccessor
getHeaderFields
Methods inherited from interface org.refcodes.web.HttpMethodAccessor
getHttpMethod
Methods inherited from interface org.refcodes.web.UrlAccessor
getUrl
-
Constructor Details
-
RestRequestEvent
public RestRequestEvent(InetSocketAddress aLocalAddress, InetSocketAddress aRemoteAddress, org.refcodes.web.HttpMethod aHttpMethod, org.refcodes.web.Url aUrl, org.refcodes.mixin.WildcardSubstitutes aWildcardSubstitutes, org.refcodes.web.RequestHeaderFields aHeaderFields, InputStream aHttpInputStream, RestServer aRestServer) Constructs aRestRequestEvent
with all required attributes.- Parameters:
aLocalAddress
- The local address where the event is being received.aRemoteAddress
- The remote address from which the request originates.aHttpMethod
- TheHttpMethod
with which the request has been sent.aUrl
- TheUrl
from which to take the URL specific data.aWildcardSubstitutes
- The text being substituted by the wildcard of theRestEndpoint
's Locator-Pattern.aHeaderFields
- TheRequestHeaderFields
sent by the request.aHttpInputStream
- TheInputStream
representing the request's HTTP body.aRestServer
- The system firing the event.
-
-
Method Details
-
getAction
public org.refcodes.web.HttpMethod getAction()- Specified by:
getAction
in interfaceorg.refcodes.mixin.ActionAccessor<org.refcodes.web.HttpMethod>
-
getSource
- Specified by:
getSource
in interfaceorg.refcodes.mixin.SourceAccessor<RestServer>
-
getWildcardReplacements
- Specified by:
getWildcardReplacements
in interfaceorg.refcodes.mixin.WildcardSubstitutes
-
getWildcardReplacementAt
- Specified by:
getWildcardReplacementAt
in interfaceorg.refcodes.mixin.WildcardSubstitutes
-
getWildcardReplacement
- Specified by:
getWildcardReplacement
in interfaceorg.refcodes.mixin.WildcardSubstitutes
-
getWildcardReplacements
- Specified by:
getWildcardReplacements
in interfaceorg.refcodes.mixin.WildcardSubstitutes
-
getWildcardReplacementsAt
- Specified by:
getWildcardReplacementsAt
in interfaceorg.refcodes.mixin.WildcardSubstitutes
-
getRemoteAddress
- Specified by:
getRemoteAddress
in interfaceorg.refcodes.web.RemoteAddressAccessor
-
getLocalAddress
- Specified by:
getLocalAddress
in interfaceorg.refcodes.web.LocalAddressAccessor
-
getRealm
- Specified by:
getRealm
in interfaceorg.refcodes.web.RealmAccessor
-
getWildcardNames
- Specified by:
getWildcardNames
in interfaceorg.refcodes.mixin.WildcardSubstitutes
-