Package org.refcodes.rest
Class RestRequestEventImpl
- java.lang.Object
-
- org.refcodes.net.HttpRequestImpl
-
- org.refcodes.net.HttpServerRequestImpl
-
- org.refcodes.rest.RestRequestEventImpl
-
- All Implemented Interfaces:
org.refcodes.matcher.WildcardSubstitutes,org.refcodes.mixin.ActionAccessor<org.refcodes.net.HttpMethod>,org.refcodes.mixin.Dumpable,org.refcodes.mixin.SourceAccessor<org.refcodes.net.HttpMethod>,org.refcodes.net.HeaderFieldsAccessor<org.refcodes.net.HttpMethod>,org.refcodes.net.HttpBodyAccessor,org.refcodes.net.HttpInputStreamAccessor,org.refcodes.net.HttpMethodAccessor,org.refcodes.net.HttpRequest,org.refcodes.net.HttpServerRequest,org.refcodes.net.LocalAddressAccessor,org.refcodes.net.RealmAccessor,org.refcodes.net.RemoteAddressAccessor,org.refcodes.net.UrlAccessor,org.refcodes.observer.GenericActionEvent<org.refcodes.net.HttpMethod,RestServer>,org.refcodes.observer.GenericEvent<org.refcodes.net.HttpMethod>,RestRequestEvent
public class RestRequestEventImpl extends org.refcodes.net.HttpServerRequestImpl implements RestRequestEvent
Implementation of theRestRequestEventinterface as good old POJO for use by differentRestServerimplementations.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.ActionAccessor
org.refcodes.mixin.ActionAccessor.ActionBuilder<A extends java.lang.Object,B extends org.refcodes.mixin.ActionAccessor.ActionBuilder<A,B>>, org.refcodes.mixin.ActionAccessor.ActionMutator<A extends java.lang.Object>, org.refcodes.mixin.ActionAccessor.ActionProperty<A extends java.lang.Object>
-
Nested classes/interfaces inherited from interface org.refcodes.net.HeaderFieldsAccessor
org.refcodes.net.HeaderFieldsAccessor.HeaderFieldsBuilder<T extends org.refcodes.net.HeaderFields<?,?>,B extends org.refcodes.net.HeaderFieldsAccessor.HeaderFieldsBuilder<T,B>>, org.refcodes.net.HeaderFieldsAccessor.HeaderFieldsMutator<T extends org.refcodes.net.HeaderFields<?,?>>, org.refcodes.net.HeaderFieldsAccessor.HeaderFieldsProperty<T extends org.refcodes.net.HeaderFields<?,?>>
-
Nested classes/interfaces inherited from interface org.refcodes.net.HttpBodyAccessor
org.refcodes.net.HttpBodyAccessor.HttpBodyBuilder<B extends org.refcodes.net.HttpBodyAccessor.HttpBodyBuilder<B>>, org.refcodes.net.HttpBodyAccessor.HttpBodyMutator, org.refcodes.net.HttpBodyAccessor.HttpBodyProperty, org.refcodes.net.HttpBodyAccessor.HttpBodyProvider<EXC extends java.lang.Exception>
-
Nested classes/interfaces inherited from interface org.refcodes.net.HttpInputStreamAccessor
org.refcodes.net.HttpInputStreamAccessor.HttpInputStreamBuilder<B extends org.refcodes.net.HttpInputStreamAccessor.HttpInputStreamBuilder<B>>, org.refcodes.net.HttpInputStreamAccessor.HttpInputStreamMutator, org.refcodes.net.HttpInputStreamAccessor.HttpInputStreamProperty, org.refcodes.net.HttpInputStreamAccessor.HttpInputStreamProvider<EXC extends java.lang.Exception>
-
Nested classes/interfaces inherited from interface org.refcodes.net.HttpMethodAccessor
org.refcodes.net.HttpMethodAccessor.HttpMethodBuilder<B extends org.refcodes.net.HttpMethodAccessor.HttpMethodBuilder<B>>, org.refcodes.net.HttpMethodAccessor.HttpMethodMutator, org.refcodes.net.HttpMethodAccessor.HttpMethodProperty
-
Nested classes/interfaces inherited from interface org.refcodes.net.LocalAddressAccessor
org.refcodes.net.LocalAddressAccessor.LocalAddressBuilder<B extends org.refcodes.net.LocalAddressAccessor.LocalAddressBuilder<B>>, org.refcodes.net.LocalAddressAccessor.LocalAddressMutator, org.refcodes.net.LocalAddressAccessor.LocalAddressProperty
-
Nested classes/interfaces inherited from interface org.refcodes.net.RealmAccessor
org.refcodes.net.RealmAccessor.RealmBuilder<B extends org.refcodes.net.RealmAccessor.RealmBuilder<B>>, org.refcodes.net.RealmAccessor.RealmMutator, org.refcodes.net.RealmAccessor.RealmProperty
-
Nested classes/interfaces inherited from interface org.refcodes.net.RemoteAddressAccessor
org.refcodes.net.RemoteAddressAccessor.RemoteAddressBuilder<B extends org.refcodes.net.RemoteAddressAccessor.RemoteAddressBuilder<B>>, org.refcodes.net.RemoteAddressAccessor.RemoteAddressMutator, org.refcodes.net.RemoteAddressAccessor.RemoteAddressProperty
-
-
Constructor Summary
Constructors Constructor Description RestRequestEventImpl(java.net.InetSocketAddress aLocalAddress, java.net.InetSocketAddress aRemoteAddress, org.refcodes.net.HttpMethod aHttpMethod, org.refcodes.net.Url aUrl, org.refcodes.matcher.WildcardSubstitutes aWildcardSubstitutes, org.refcodes.net.RequestHeaderFields aHeaderFields, java.io.InputStream aHttpInputStream, RestServer aRestServer)Constructs aRestRequestEventwith all required attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.InetSocketAddressgetLocalAddress()java.lang.StringgetRealm()java.net.InetSocketAddressgetRemoteAddress()RestServergetSource()java.lang.String[]getWildcardNames()java.lang.StringgetWildcardReplacement(java.lang.String aWildcardName)java.lang.StringgetWildcardReplacementAt(int aIndex)java.lang.String[]getWildcardReplacements()java.lang.String[]getWildcardReplacements(java.lang.String... aWildcardNames)java.lang.String[]getWildcardReplacementsAt(int... aIndexes)-
Methods inherited from class org.refcodes.net.HttpRequestImpl
getHeaderFields, getHttpMethod, getUrl
-
Methods inherited from class org.refcodes.net.HttpServerRequestImpl
getHttpBody, getHttpInputStream, getRequest, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.refcodes.rest.RestRequestEvent
getAction
-
-
-
-
Constructor Detail
-
RestRequestEventImpl
public RestRequestEventImpl(java.net.InetSocketAddress aLocalAddress, java.net.InetSocketAddress aRemoteAddress, org.refcodes.net.HttpMethod aHttpMethod, org.refcodes.net.Url aUrl, org.refcodes.matcher.WildcardSubstitutes aWildcardSubstitutes, org.refcodes.net.RequestHeaderFields aHeaderFields, java.io.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
-
getSource
public RestServer getSource()
- Specified by:
getSourcein interfaceorg.refcodes.mixin.SourceAccessor<org.refcodes.net.HttpMethod>
-
getWildcardReplacements
public java.lang.String[] getWildcardReplacements()
- Specified by:
getWildcardReplacementsin interfaceorg.refcodes.matcher.WildcardSubstitutes
-
getWildcardReplacementAt
public java.lang.String getWildcardReplacementAt(int aIndex)
- Specified by:
getWildcardReplacementAtin interfaceorg.refcodes.matcher.WildcardSubstitutes
-
getWildcardReplacement
public java.lang.String getWildcardReplacement(java.lang.String aWildcardName)
- Specified by:
getWildcardReplacementin interfaceorg.refcodes.matcher.WildcardSubstitutes
-
getWildcardReplacements
public java.lang.String[] getWildcardReplacements(java.lang.String... aWildcardNames)
- Specified by:
getWildcardReplacementsin interfaceorg.refcodes.matcher.WildcardSubstitutes
-
getWildcardReplacementsAt
public java.lang.String[] getWildcardReplacementsAt(int... aIndexes)
- Specified by:
getWildcardReplacementsAtin interfaceorg.refcodes.matcher.WildcardSubstitutes
-
getRemoteAddress
public java.net.InetSocketAddress getRemoteAddress()
- Specified by:
getRemoteAddressin interfaceorg.refcodes.net.RemoteAddressAccessor
-
getLocalAddress
public java.net.InetSocketAddress getLocalAddress()
- Specified by:
getLocalAddressin interfaceorg.refcodes.net.LocalAddressAccessor
-
getRealm
public java.lang.String getRealm()
- Specified by:
getRealmin interfaceorg.refcodes.net.RealmAccessor
-
getWildcardNames
public java.lang.String[] getWildcardNames()
- Specified by:
getWildcardNamesin interfaceorg.refcodes.matcher.WildcardSubstitutes
-
-