Package one.xingyi.core.endpoints
Interface EndPoint
-
- All Superinterfaces:
java.util.function.Function<ServiceRequest,java.util.concurrent.CompletableFuture<java.util.Optional<ServiceResponse>>>,MethodAndPathDescription
- All Known Subinterfaces:
IMediaTypeEndpoint<Request,Entity>,IResourceEndPoint<Entity,Request,Result>
- All Known Implementing Classes:
EntityMediaTypeEndpoint,IdAndEntityMediaTypeEndpoint,OptionalEntityMediaTypeEndpoint
public interface EndPoint extends java.util.function.Function<ServiceRequest,java.util.concurrent.CompletableFuture<java.util.Optional<ServiceResponse>>>, MethodAndPathDescription
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static EndPointcompose(java.util.List<EndPoint> endPoints)static EndPointcompose(java.util.List<EndPoint> endPoints, boolean debug)static ServiceResponsedefaultErrorHandler(java.lang.Throwable e)static java.util.function.Function<ServiceRequest,java.lang.String>defaultNotFound(EndPoint endPoint)java.util.List<MethodPathAndDescription>description()static ServiceResponseinternalError(java.lang.Throwable e)static <J> EndPointjavascript(EndpointContext<J> context, java.lang.String prefix)static EndPointprintlnDetailsLog(EndPoint endPoint)static EndPointprintlnLog(EndPoint endPoint)static EndPointstaticEndpoint(EndpointAcceptor0 acceptor, ServiceResponse serviceResponse)static java.util.function.Function<ServiceRequest,java.util.concurrent.CompletableFuture<ServiceResponse>>toKliesli(java.util.function.Function<ServiceRequest,java.util.concurrent.CompletableFuture<java.util.Optional<ServiceResponse>>> original, java.util.function.Function<ServiceRequest,java.lang.String> bodyIfNotFound)static java.util.function.Function<ServiceRequest,java.util.concurrent.CompletableFuture<ServiceResponse>>toKliesli(EndPoint original)
-
-
-
Method Detail
-
description
java.util.List<MethodPathAndDescription> description()
- Specified by:
descriptionin interfaceMethodAndPathDescription
-
defaultNotFound
static java.util.function.Function<ServiceRequest,java.lang.String> defaultNotFound(EndPoint endPoint)
-
toKliesli
static java.util.function.Function<ServiceRequest,java.util.concurrent.CompletableFuture<ServiceResponse>> toKliesli(EndPoint original)
-
toKliesli
static java.util.function.Function<ServiceRequest,java.util.concurrent.CompletableFuture<ServiceResponse>> toKliesli(java.util.function.Function<ServiceRequest,java.util.concurrent.CompletableFuture<java.util.Optional<ServiceResponse>>> original, java.util.function.Function<ServiceRequest,java.lang.String> bodyIfNotFound)
-
defaultErrorHandler
static ServiceResponse defaultErrorHandler(java.lang.Throwable e)
-
internalError
static ServiceResponse internalError(java.lang.Throwable e)
-
javascript
static <J> EndPoint javascript(EndpointContext<J> context, java.lang.String prefix)
-
staticEndpoint
static EndPoint staticEndpoint(EndpointAcceptor0 acceptor, ServiceResponse serviceResponse)
-
-