Package org.nustaq.kontraktor.apputil
Interface LinkMapperMixin<SELF extends org.nustaq.kontraktor.Actor<SELF>>
- Type Parameters:
SELF-
- All Known Subinterfaces:
RegistrationMixin<SELF>
public interface LinkMapperMixin<SELF extends org.nustaq.kontraktor.Actor<SELF>>
associates a link with a record in Table links + built in support for registration handling.
Assumes implementation by ServerActor
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidgetActor()handleLinkFailure(String linkId) default voidhandleLinkHttp(io.undertow.server.HttpServerExchange httpServerExchange) assume registration on builder with e.g. .httpHandler("link", httpServerExchange -> { httpServerExchange.dispatch(); app.handleLinkHttp(httpServerExchange); })handleLinkSuccess(String linkId, org.nustaq.reallive.api.Record linkRecord) default org.nustaq.kontraktor.IPromise<String>putRecord(org.nustaq.reallive.api.Record rec) return uuid to use as link
-
Field Details
-
LinkTableName
- See Also:
-
-
Method Details
-
auto
static void auto(org.nustaq.kontraktor.remoting.http.undertow.builder.BldFourK bld, Object linkMapper) -
getDClient
DataClient getDClient() -
handleLinkSuccess
- Parameters:
linkId-linkRecord-- Returns:
- htmlpage to render
-
handleLinkFailure
- Parameters:
linkId-- Returns:
- htmlpage to render
-
getActor
SELF getActor() -
putRecord
return uuid to use as link- Parameters:
rec-- Returns:
-
handleLinkHttp
default void handleLinkHttp(io.undertow.server.HttpServerExchange httpServerExchange) assume registration on builder with e.g. .httpHandler("link", httpServerExchange -> { httpServerExchange.dispatch(); app.handleLinkHttp(httpServerExchange); })- Parameters:
httpServerExchange-
-