- java.lang.Object
-
- org.refcodes.web.AbstractHttpRequest
-
- org.refcodes.web.HttpServerRequestImpl
-
- org.refcodes.rest.RestRequestEvent
-
- All Implemented Interfaces:
org.refcodes.matcher.WildcardSubstitutes,org.refcodes.mixin.ActionAccessor<org.refcodes.web.HttpMethod>,org.refcodes.mixin.Dumpable,org.refcodes.mixin.SourceAccessor<RestServer>,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.HttpServerRequest,org.refcodes.web.LocalAddressAccessor,org.refcodes.web.RealmAccessor,org.refcodes.web.RemoteAddressAccessor,org.refcodes.web.UrlAccessor
public class RestRequestEvent extends org.refcodes.web.HttpServerRequestImpl implements org.refcodes.observer.GenericActionEvent<org.refcodes.web.HttpMethod,RestServer>, org.refcodes.web.HttpServerRequest, org.refcodes.matcher.WildcardSubstitutes, org.refcodes.web.RemoteAddressAccessor, org.refcodes.web.LocalAddressAccessor, org.refcodes.web.RealmAccessor, org.refcodes.mixin.Dumpable
Defines aRestRequestEventbeing the request as consumed by aRestEndpoint. Usually you will useRestServer.onRequest(HttpMethod, String, RestRequestConsumer)for registering aRestRequestConsumerto theRestServer(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
-
-
Constructor Summary
Constructors Constructor Description RestRequestEvent(InetSocketAddress aLocalAddress, InetSocketAddress aRemoteAddress, org.refcodes.web.HttpMethod aHttpMethod, org.refcodes.web.Url aUrl, org.refcodes.matcher.WildcardSubstitutes aWildcardSubstitutes, org.refcodes.web.RequestHeaderFields aHeaderFields, InputStream aHttpInputStream, RestServer aRestServer)Constructs aRestRequestEventwith all required attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.refcodes.web.HttpMethodgetAction()InetSocketAddressgetLocalAddress()StringgetRealm()InetSocketAddressgetRemoteAddress()RestServergetSource()String[]getWildcardNames()StringgetWildcardReplacement(String aWildcardName)StringgetWildcardReplacementAt(int aIndex)String[]getWildcardReplacements()String[]getWildcardReplacements(String... aWildcardNames)String[]getWildcardReplacementsAt(int... aIndexes)-
Methods inherited from class org.refcodes.web.HttpServerRequestImpl
getHttpBody, getHttpInputStream, getRequest, toString
-
Methods inherited from class org.refcodes.web.AbstractHttpRequest
getHeaderFields, getHttpMethod, getUrl
-
-
-
-
Constructor Detail
-
RestRequestEvent
public RestRequestEvent(InetSocketAddress aLocalAddress, InetSocketAddress aRemoteAddress, org.refcodes.web.HttpMethod aHttpMethod, org.refcodes.web.Url aUrl, org.refcodes.matcher.WildcardSubstitutes aWildcardSubstitutes, org.refcodes.web.RequestHeaderFields aHeaderFields, InputStream aHttpInputStream, RestServer aRestServer)
Constructs aRestRequestEventwith all required attributes.- Parameters:
aLocalAddress- The local address where the event is being received.aRemoteAddress- The remote address from which the request originates.aHttpMethod- TheHttpMethodwith which the request has been sent.aUrl- TheUrlfrom which to take the URL specific data.aWildcardSubstitutes- The text being substituted by the wildcard of theRestEndpoint's Locator-Pattern.aHeaderFields- TheRequestHeaderFieldssent by the request.aHttpInputStream- TheInputStreamrepresenting the request's HTTP body.aRestServer- The system firing the event.
-
-
Method Detail
-
getAction
public org.refcodes.web.HttpMethod getAction()
- Specified by:
getActionin interfaceorg.refcodes.mixin.ActionAccessor<org.refcodes.web.HttpMethod>
-
getSource
public RestServer getSource()
- Specified by:
getSourcein interfaceorg.refcodes.mixin.SourceAccessor<RestServer>
-
getWildcardReplacements
public String[] getWildcardReplacements()
- Specified by:
getWildcardReplacementsin interfaceorg.refcodes.matcher.WildcardSubstitutes
-
getWildcardReplacementAt
public String getWildcardReplacementAt(int aIndex)
- Specified by:
getWildcardReplacementAtin interfaceorg.refcodes.matcher.WildcardSubstitutes
-
getWildcardReplacement
public String getWildcardReplacement(String aWildcardName)
- Specified by:
getWildcardReplacementin interfaceorg.refcodes.matcher.WildcardSubstitutes
-
getWildcardReplacements
public String[] getWildcardReplacements(String... aWildcardNames)
- Specified by:
getWildcardReplacementsin interfaceorg.refcodes.matcher.WildcardSubstitutes
-
getWildcardReplacementsAt
public String[] getWildcardReplacementsAt(int... aIndexes)
- Specified by:
getWildcardReplacementsAtin interfaceorg.refcodes.matcher.WildcardSubstitutes
-
getRemoteAddress
public InetSocketAddress getRemoteAddress()
- Specified by:
getRemoteAddressin interfaceorg.refcodes.web.RemoteAddressAccessor
-
getLocalAddress
public InetSocketAddress getLocalAddress()
- Specified by:
getLocalAddressin interfaceorg.refcodes.web.LocalAddressAccessor
-
getRealm
public String getRealm()
- Specified by:
getRealmin interfaceorg.refcodes.web.RealmAccessor
-
getWildcardNames
public String[] getWildcardNames()
- Specified by:
getWildcardNamesin interfaceorg.refcodes.matcher.WildcardSubstitutes
-
-