[{"data":1,"prerenderedAt":816},["ShallowReactive",2],{"navigation_docs":3,"-apps-services-calling-services-from-java":263,"-apps-services-calling-services-from-java-surround":811},[4,19,39,169],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":18},"Quickstart","i-lucide-rocket","\u002Fgetting-started","01.getting-started",[10,14],{"title":11,"path":12,"stem":13},"Introduction","\u002Fgetting-started\u002Fintroduction","01.getting-started\u002F01.introduction",{"title":15,"path":16,"stem":17},"Quick Start","\u002Fgetting-started\u002Fquick-start","01.getting-started\u002F02.quick-start",false,{"title":20,"icon":21,"path":22,"stem":23,"children":24,"page":18},"Organizations","i-lucide-building","\u002Forganizations","02.organizations",[25,29,34],{"title":26,"path":27,"stem":28,"icon":21},"Overview","\u002Forganizations\u002Foverview","02.organizations\u002F01.overview",{"title":30,"path":31,"stem":32,"icon":33},"Auth Providers","\u002Forganizations\u002Fauthentication-providers","02.organizations\u002F02.authentication-providers","i-lucide-key-round",{"title":35,"path":36,"stem":37,"icon":38},"Okta SSO Setup","\u002Forganizations\u002Fokta-sso-setup","02.organizations\u002F03.okta-sso-setup","i-lucide-shield-check",{"title":40,"icon":41,"path":42,"stem":43,"children":44,"page":18},"Apps","i-lucide-app-window","\u002Fapps","03.apps",[45,62,87,120,129,149,154],{"title":46,"icon":47,"path":48,"stem":49,"children":50,"page":18},"Structure","i-lucide-folder-tree","\u002Fapps\u002Fapplication-structure","03.apps\u002F03.application-structure",[51,54,58],{"title":26,"path":52,"stem":53},"\u002Fapps\u002Fapplication-structure\u002Foverview","03.apps\u002F03.application-structure\u002F01.overview",{"title":55,"path":56,"stem":57},"Applications and Projects","\u002Fapps\u002Fapplication-structure\u002Fapplications-and-projects","03.apps\u002F03.application-structure\u002F02.applications-and-projects",{"title":59,"path":60,"stem":61},"Artifact Types","\u002Fapps\u002Fapplication-structure\u002Fartifact-types","03.apps\u002F03.application-structure\u002F03.artifact-types",{"title":63,"icon":64,"path":65,"stem":66,"children":67,"page":18},"Services","i-lucide-network","\u002Fapps\u002Fservices","03.apps\u002F04.services",[68,71,75,79,83],{"title":26,"path":69,"stem":70},"\u002Fapps\u002Fservices\u002Foverview","03.apps\u002F04.services\u002F01.overview",{"title":72,"path":73,"stem":74},"Publishing Services","\u002Fapps\u002Fservices\u002Fpublishing-services","03.apps\u002F04.services\u002F02.publishing-services",{"title":76,"path":77,"stem":78},"Service Proxies","\u002Fapps\u002Fservices\u002Fservice-proxies","03.apps\u002F04.services\u002F03.service-proxies",{"title":80,"path":81,"stem":82},"Streaming","\u002Fapps\u002Fservices\u002Fstreaming","03.apps\u002F04.services\u002F04.streaming",{"title":84,"path":85,"stem":86},"Calling Services from Java","\u002Fapps\u002Fservices\u002Fcalling-services-from-java","03.apps\u002F04.services\u002F05.calling-services-from-java",{"title":88,"icon":89,"path":90,"stem":91,"children":92,"page":18},"Persistence","i-lucide-database","\u002Fapps\u002Fpersistence","03.apps\u002F05.persistence",[93,96,100,104,108,112,116],{"title":26,"path":94,"stem":95},"\u002Fapps\u002Fpersistence\u002Foverview","03.apps\u002F05.persistence\u002F01.overview",{"title":97,"path":98,"stem":99},"Defining Entities","\u002Fapps\u002Fpersistence\u002Fdefining-entities","03.apps\u002F05.persistence\u002F02.defining-entities",{"title":101,"path":102,"stem":103},"Entity Decorators","\u002Fapps\u002Fpersistence\u002Fentity-decorators","03.apps\u002F05.persistence\u002F03.entity-decorators",{"title":105,"path":106,"stem":107},"CRUD Operations","\u002Fapps\u002Fpersistence\u002Fcrud-operations","03.apps\u002F05.persistence\u002F04.crud-operations",{"title":109,"path":110,"stem":111},"Named Queries","\u002Fapps\u002Fpersistence\u002Fnamed-queries","03.apps\u002F05.persistence\u002F05.named-queries",{"title":113,"path":114,"stem":115},"Multi-Tenancy","\u002Fapps\u002Fpersistence\u002Fmulti-tenancy","03.apps\u002F05.persistence\u002F06.multi-tenancy",{"title":117,"path":118,"stem":119},"Migrations","\u002Fapps\u002Fpersistence\u002Fmigrations","03.apps\u002F05.persistence\u002F07.migrations",{"title":121,"icon":38,"path":122,"stem":123,"children":124,"page":18},"Security","\u002Fapps\u002Fsecurity","03.apps\u002F06.security",[125],{"title":126,"path":127,"stem":128,"icon":33},"Authentication","\u002Fapps\u002Fsecurity\u002Fauthentication","03.apps\u002F06.security\u002F01.authentication",{"title":130,"icon":131,"path":132,"stem":133,"children":134,"page":18},"Deployment","i-lucide-cloud-upload","\u002Fapps\u002Fdeployment","03.apps\u002F07.deployment",[135,140,145],{"title":136,"path":137,"stem":138,"icon":139},"Deployment Workflow","\u002Fapps\u002Fdeployment\u002Fworkflow","03.apps\u002F07.deployment\u002F01.workflow","i-lucide-git-branch",{"title":141,"path":142,"stem":143,"icon":144},"Environments","\u002Fapps\u002Fdeployment\u002Fenvironments","03.apps\u002F07.deployment\u002F02.environments","i-lucide-server",{"title":146,"path":147,"stem":148,"icon":6},"Push to Deploy","\u002Fapps\u002Fdeployment\u002Fpush-to-deploy","03.apps\u002F07.deployment\u002F03.push-to-deploy",{"title":150,"path":151,"stem":152,"icon":153},"CLI Reference","\u002Fapps\u002Fcli-reference","03.apps\u002F08.cli-reference","i-lucide-terminal",{"title":155,"icon":156,"path":157,"stem":158,"children":159,"page":18},"Reference","i-lucide-book-open","\u002Fapps\u002Freference","03.apps\u002F09.reference",[160,165],{"title":161,"path":162,"stem":163,"icon":164},"Decorators Reference","\u002Fapps\u002Freference\u002Fdecorators","03.apps\u002F09.reference\u002F01.decorators","i-lucide-at-sign",{"title":166,"path":167,"stem":168,"icon":89},"Migration SQL Grammar","\u002Fapps\u002Freference\u002Fmigration-sql-grammar","03.apps\u002F09.reference\u002F02.migration-sql-grammar",{"title":170,"icon":144,"path":171,"stem":172,"children":173,"page":18},"Kinotic OS","\u002Fplatform","04.platform",[174,179,183,188,192,197,201,206,211,216,221,226,248,253,258],{"title":175,"path":176,"stem":177,"icon":178},"System Architecture","\u002Fplatform\u002Farchitecture","04.platform\u002F01.architecture","i-lucide-boxes",{"title":180,"path":181,"stem":182,"icon":6},"Deployment Guide","\u002Fplatform\u002Fdeployment-guide","04.platform\u002F02.deployment-guide",{"title":184,"path":185,"stem":186,"icon":187},"Configuration","\u002Fplatform\u002Fconfiguration","04.platform\u002F03.configuration","i-lucide-settings",{"title":189,"path":190,"stem":191,"icon":21},"Organization Management","\u002Fplatform\u002Forganization-management","04.platform\u002F04.organization-management",{"title":193,"path":194,"stem":195,"icon":196},"System Security","\u002Fplatform\u002Fsystem-security","04.platform\u002F05.system-security","i-lucide-shield",{"title":198,"path":199,"stem":200,"icon":38},"Defense in Depth","\u002Fplatform\u002Fdefense-in-depth","04.platform\u002F06.defense-in-depth",{"title":202,"path":203,"stem":204,"icon":205},"MCP Tools","\u002Fplatform\u002Fmcp-tools","04.platform\u002F07.mcp-tools","i-lucide-bot",{"title":207,"path":208,"stem":209,"icon":210},"Observability","\u002Fplatform\u002Fobservability","04.platform\u002F08.observability","i-lucide-activity",{"title":212,"path":213,"stem":214,"icon":215},"Contributing","\u002Fplatform\u002Fcontributing","04.platform\u002F09.contributing","i-lucide-git-pull-request",{"title":217,"path":218,"stem":219,"icon":220},"System Migrations","\u002Fplatform\u002Fsystem-migrations","04.platform\u002F10.system-migrations","i-lucide-database-zap",{"title":222,"path":223,"stem":224,"icon":225},"Service Call Liveness","\u002Fplatform\u002Fservice-call-liveness","04.platform\u002F11.service-call-liveness","i-lucide-heart-pulse",{"title":155,"icon":156,"path":227,"stem":228,"children":229,"page":18},"\u002Fplatform\u002Freference","04.platform\u002F12.reference",[230,235,240,244],{"title":231,"path":232,"stem":233,"icon":234},"CRI Format","\u002Fplatform\u002Freference\u002Fcri-format","04.platform\u002F12.reference\u002F01.cri-format","i-lucide-link",{"title":236,"path":237,"stem":238,"icon":239},"Grind Jobs","\u002Fplatform\u002Freference\u002Fgrind-jobs","04.platform\u002F12.reference\u002F02.grind-jobs","i-lucide-workflow",{"title":241,"path":242,"stem":243,"icon":178},"Project Publishing Design","\u002Fplatform\u002Freference\u002Fproject-publishing-design","04.platform\u002F12.reference\u002F03.project-publishing-design",{"title":245,"path":246,"stem":247,"icon":33},"Sign-In Design","\u002Fplatform\u002Freference\u002Fsign-in-design","04.platform\u002F12.reference\u002F04.sign-in-design",{"title":249,"path":250,"stem":251,"icon":252},"Development Server","\u002Fplatform\u002Fdevelopment-server","04.platform\u002F13.development-server","i-lucide-server-cog",{"title":254,"path":255,"stem":256,"icon":257},"Supply Chain Security","\u002Fplatform\u002Fsupply-chain-security","04.platform\u002F14.supply-chain-security","i-lucide-package-check",{"title":259,"path":260,"stem":261,"icon":262},"Enterprise License","\u002Fplatform\u002Fenterprise-license","04.platform\u002F15.enterprise-license","i-lucide-badge-check",{"id":264,"title":84,"body":265,"description":805,"extension":806,"links":807,"meta":808,"navigation":357,"path":85,"seo":809,"stem":86,"__hash__":810},"docs\u002F03.apps\u002F04.services\u002F05.calling-services-from-java.md",{"type":266,"value":267,"toc":799},"minimark",[268,281,286,302,324,328,440,474,502,524,528,551,630,644,647,671,678,688,692,703,758,770,773,792,795],[269,270,271,272,276,277,280],"p",{},"A Java program that is a member of a Kinotic cluster calls services through the proxies its ",[273,274,275],"code",{},"ServiceRegistry","\nhands out, over the cluster's own event bus. A Java program outside the cluster, such as a service of one\ninstallation calling a service of another, uses ",[273,278,279],{},"kinotic-client",", the Java client of Kinotic RPC: it connects\nto a gateway over STOMP on a WebSocket, the protocol the TypeScript client speaks, and hands out the same typed\nproxies, so a service interface is called the same way from either side.",[282,283,285],"h2",{"id":284},"adding-the-client","Adding the client",[287,288,293],"pre",{"className":289,"code":290,"language":291,"meta":292,"style":292},"language-groovy shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","implementation 'org.kinotic:kinotic-client:\u003Cversion>'\n","groovy","",[273,294,295],{"__ignoreMap":292},[296,297,300],"span",{"class":298,"line":299},"line",1,[296,301,290],{},[269,303,304,305,308,309,312,313,315,316,319,320,323],{},"The client is part of Kinotic RPC, licensed under the Apache License 2.0, and depends on ",[273,306,307],{},"kinotic-core"," for the\nproxies and on Vert.x for the transport. It auto-configures itself in a Spring Boot application whose application\nclass carries ",[273,310,311],{},"@EnableKinotic",", as a Kinotic OS server's does. ",[273,314,307],{}," makes that application a Kinotic node\nof its own, with its own Ignite instance and clustered Vert.x, even when it only calls a gateway; which nodes it\ndiscovers, if any, is what its ",[273,317,318],{},"kinotic.ignite"," properties decide. The beans a service proxy is built from, the\nconverters of its arguments, replies and exceptions and the handlers of its return types, are the node's, so a\nconnection's proxies convert as a cluster member's do. The client adds a ",[273,321,322],{},"KinoticConnectionFactory",", and every\nconnection runs on a context of its own on the node's Vert.x instance. A Kinotic OS server calls a gateway the same\nway: its connections run on its own Vert.x instance and convert with its own mapper.",[282,325,327],{"id":326},"connecting","Connecting",[287,329,333],{"className":330,"code":331,"language":332,"meta":292,"style":292},"language-java shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import org.kinotic.client.api.ConnectOptions;\nimport org.kinotic.client.api.KinoticConnection;\nimport org.kinotic.client.api.KinoticConnectionFactory;\n\n@Service\n@RequiredArgsConstructor\npublic class LicenseKeys {\n\n    private final KinoticConnectionFactory connectionFactory;\n\n    public Future\u003CKinoticConnection> connect(String secret) {\n        ConnectOptions options = new ConnectOptions()\n                .setServerUrl(\"wss:\u002F\u002Fapi.kinotic.ai\")\n                .setAuthHeaders(Map.of(\"clientId\", \"orders-sync\", \"clientSecret\", secret, \"organizationId\", \"acme-org\"));\n        return connectionFactory.connect(options);\n    }\n\n}\n","java",[273,334,335,340,346,352,359,365,371,377,382,388,393,399,405,411,417,423,429,434],{"__ignoreMap":292},[296,336,337],{"class":298,"line":299},[296,338,339],{},"import org.kinotic.client.api.ConnectOptions;\n",[296,341,343],{"class":298,"line":342},2,[296,344,345],{},"import org.kinotic.client.api.KinoticConnection;\n",[296,347,349],{"class":298,"line":348},3,[296,350,351],{},"import org.kinotic.client.api.KinoticConnectionFactory;\n",[296,353,355],{"class":298,"line":354},4,[296,356,358],{"emptyLinePlaceholder":357},true,"\n",[296,360,362],{"class":298,"line":361},5,[296,363,364],{},"@Service\n",[296,366,368],{"class":298,"line":367},6,[296,369,370],{},"@RequiredArgsConstructor\n",[296,372,374],{"class":298,"line":373},7,[296,375,376],{},"public class LicenseKeys {\n",[296,378,380],{"class":298,"line":379},8,[296,381,358],{"emptyLinePlaceholder":357},[296,383,385],{"class":298,"line":384},9,[296,386,387],{},"    private final KinoticConnectionFactory connectionFactory;\n",[296,389,391],{"class":298,"line":390},10,[296,392,358],{"emptyLinePlaceholder":357},[296,394,396],{"class":298,"line":395},11,[296,397,398],{},"    public Future\u003CKinoticConnection> connect(String secret) {\n",[296,400,402],{"class":298,"line":401},12,[296,403,404],{},"        ConnectOptions options = new ConnectOptions()\n",[296,406,408],{"class":298,"line":407},13,[296,409,410],{},"                .setServerUrl(\"wss:\u002F\u002Fapi.kinotic.ai\")\n",[296,412,414],{"class":298,"line":413},14,[296,415,416],{},"                .setAuthHeaders(Map.of(\"clientId\", \"orders-sync\", \"clientSecret\", secret, \"organizationId\", \"acme-org\"));\n",[296,418,420],{"class":298,"line":419},15,[296,421,422],{},"        return connectionFactory.connect(options);\n",[296,424,426],{"class":298,"line":425},16,[296,427,428],{},"    }\n",[296,430,432],{"class":298,"line":431},17,[296,433,358],{"emptyLinePlaceholder":357},[296,435,437],{"class":298,"line":436},18,[296,438,439],{},"}\n",[269,441,442,445,446,449,450,453,454,457,458,461,462,465,466,469,470,473],{},[273,443,444],{},"serverUrl"," names the gateway with a ",[273,447,448],{},"ws:\u002F\u002F"," or ",[273,451,452],{},"wss:\u002F\u002F"," URL; the client appends the gateway's STOMP endpoint\npath itself. The ",[273,455,456],{},"authHeaders"," are sent on the WebSocket upgrade request, and the gateway's ",[273,459,460],{},"SecurityService","\nauthenticates the connection from them before the STOMP session starts; the client never interprets them, so\nwhatever a gateway's security service expects, from a client id and secret to a bearer token, goes in the map as\nheaders. Rejected credentials fail the connect with an ",[273,463,464],{},"AuthenticationException",", and any other 4xx answer to the\nupgrade, such as the 404 of a URL that names no gateway, fails it with the rejection, since no retry changes\neither. A gateway that cannot be reached, or that answers with a 5xx, as it does with a 503 while its own security\nservice cannot answer, is retried with the backoff of the options' ",[273,467,468],{},"ReconnectOptions",", forever unless ",[273,471,472],{},"maxAttempts","\nbounds it. The connection keeps a copy of the options it was opened with, so a change to them afterwards does not\nreach it; only what the TLS options cannot copy is shared with it: the buffers holding its certificates, keys and\nrevocation lists, and a key or trust manager factory it wraps.",[269,475,476,477,480,481,483,484,487,488,490,491,493,494,497,498,501],{},"Once connected, ",[273,478,479],{},"connectedInfo()"," holds what the gateway reported: the participant it authenticated the connection\nas, and the reply destination id it issued for the connection. A ",[273,482,452],{}," connection trusts the JDK's default\ncertificates; ",[273,485,486],{},"setSslOptions"," supplies its own trust or key material. Over ",[273,489,448],{}," the ",[273,492,456],{}," leave the\nprocess in clear, so ",[273,495,496],{},"connect"," refuses them to a host other than localhost unless\n",[273,499,500],{},"setAllowCleartextCredentials(true)"," says the gateway is reached safely another way, behind a TLS-terminating proxy\nor on a private network.",[269,503,504,505,508,509,512,513,516,517,520,521,523],{},"Two limits bound what the connection accepts, each defaulting to 2 MB, the default of the gateway's\n",[273,506,507],{},"kinotic.maxEventPayloadSize",": ",[273,510,511],{},"maxBodyLength",", the size a reply's body must stay under, and\n",[273,514,515],{},"maxWebSocketFrameSize",", the largest WebSocket frame the client accepts. A reply over either ends the connection:\nthe call it answers fails with an ",[273,518,519],{},"RpcServiceUnavailableException",", every other call in flight fails the same way,\nand the client reconnects. A gateway whose ",[273,522,507],{}," is raised writes replies in WebSocket\nframes of up to that size, so both limits are raised with it; a request larger than that property is refused by\nthe gateway.",[282,525,527],{"id":526},"getting-a-proxy","Getting a proxy",[269,529,530,531,534,535,538,539,542,543,546,547,550],{},"A proxy is created for the published interface itself, or for a ",[273,532,533],{},"@Proxy"," interface mirroring the service's\nmethods. Each method of the interface returns a ",[273,536,537],{},"CompletableFuture",", a Vert.x ",[273,540,541],{},"Future",", a ",[273,544,545],{},"Mono"," or a ",[273,548,549],{},"Flux",".",[287,552,554],{"className":330,"code":553,"language":332,"meta":292,"style":292},"@Publish\n@Version(\"1.0.0\")\n@Zone(\"management-api\")\npublic interface ITestService {\n\n    CompletableFuture\u003CString> testMethodWithString(String value);\n\n    Flux\u003Cbyte[]> getBinaryDataStream();\n\n}\n\nRpcServiceProxyHandle\u003CITestService> handle = connection.serviceProxy(ITestService.class);\nITestService testService = handle.getService();\n\nString greeting = testService.testMethodWithString(\"Bob\").get();        \u002F\u002F \"Hello Bob\"\nList\u003Cbyte[]> chunks = testService.getBinaryDataStream().collectList().block();\n",[273,555,556,561,566,571,576,580,585,589,594,598,602,606,611,616,620,625],{"__ignoreMap":292},[296,557,558],{"class":298,"line":299},[296,559,560],{},"@Publish\n",[296,562,563],{"class":298,"line":342},[296,564,565],{},"@Version(\"1.0.0\")\n",[296,567,568],{"class":298,"line":348},[296,569,570],{},"@Zone(\"management-api\")\n",[296,572,573],{"class":298,"line":354},[296,574,575],{},"public interface ITestService {\n",[296,577,578],{"class":298,"line":361},[296,579,358],{"emptyLinePlaceholder":357},[296,581,582],{"class":298,"line":367},[296,583,584],{},"    CompletableFuture\u003CString> testMethodWithString(String value);\n",[296,586,587],{"class":298,"line":373},[296,588,358],{"emptyLinePlaceholder":357},[296,590,591],{"class":298,"line":379},[296,592,593],{},"    Flux\u003Cbyte[]> getBinaryDataStream();\n",[296,595,596],{"class":298,"line":384},[296,597,358],{"emptyLinePlaceholder":357},[296,599,600],{"class":298,"line":390},[296,601,439],{},[296,603,604],{"class":298,"line":395},[296,605,358],{"emptyLinePlaceholder":357},[296,607,608],{"class":298,"line":401},[296,609,610],{},"RpcServiceProxyHandle\u003CITestService> handle = connection.serviceProxy(ITestService.class);\n",[296,612,613],{"class":298,"line":407},[296,614,615],{},"ITestService testService = handle.getService();\n",[296,617,618],{"class":298,"line":413},[296,619,358],{"emptyLinePlaceholder":357},[296,621,622],{"class":298,"line":419},[296,623,624],{},"String greeting = testService.testMethodWithString(\"Bob\").get();        \u002F\u002F \"Hello Bob\"\n",[296,626,627],{"class":298,"line":425},[296,628,629],{},"List\u003Cbyte[]> chunks = testService.getBinaryDataStream().collectList().block();\n",[269,631,632,635,636,639,640,643],{},[273,633,634],{},"serviceProxy(ServiceIdentifier, Class)"," addresses a service whose zone, namespace, name or version differ from the\ninterface's declarations. The proxies convert arguments and replies, and map a service's exception back to the\ncaller, exactly as a cluster member's proxies do: an exception the service threw arrives as that exception when\nits class is on the client's classpath, otherwise as an ",[273,637,638],{},"RpcInvocationException"," naming it. Releasing a handle ends\nits proxy; ",[273,641,642],{},"close()"," releases every proxy the connection still holds.",[269,645,646],{},"Arguments and replies are converted with the application's Jackson mapper, configured as a cluster member's: the\nVert.x types in their Vert.x wire format, the platform's own value types, and no constructor parameter detection.\nA gateway's own mapper may carry more, such as the module a Kinotic OS server registers for its domain types, and\nthe modules the called services' types need are added the way any Spring Boot application customizes its mapper:",[287,648,650],{"className":330,"code":649,"language":332,"meta":292,"style":292},"@Bean\npublic JsonMapperBuilderCustomizer shapes() {\n    return builder -> builder.addModule(new SimpleModule().addAbstractTypeMapping(Shape.class, Circle.class));\n}\n",[273,651,652,657,662,667],{"__ignoreMap":292},[296,653,654],{"class":298,"line":299},[296,655,656],{},"@Bean\n",[296,658,659],{"class":298,"line":342},[296,660,661],{},"public JsonMapperBuilderCustomizer shapes() {\n",[296,663,664],{"class":298,"line":348},[296,665,666],{},"    return builder -> builder.addModule(new SimpleModule().addAbstractTypeMapping(Shape.class, Circle.class));\n",[296,668,669],{"class":298,"line":354},[296,670,439],{},[269,672,673,674,677],{},"The proxies start a span for every invocation with the tracer of the application's ",[273,675,676],{},"OpenTelemetry"," bean, continued\nby the service the invocation reaches; without an SDK on the classpath the bean is the global no-op one and the\nproxies trace nothing.",[269,679,680,681,684,685,687],{},"The gateway authorizes every request against the zones the connection's participant may address (see\n",[682,683,231],"a",{"href":232},"). A request to a zone outside them fails with an\n",[273,686,638],{}," whose message is the gateway's refusal. The gateway also closes the connection over the\nrefusal, as STOMP requires of a server that answers with an ERROR frame, so other calls in flight at that moment\nfail as a lost connection does and the client reconnects.",[282,689,691],{"id":690},"connection-lifecycle","Connection lifecycle",[269,693,694,695,698,699,702],{},"The connection keeps itself alive with STOMP heartbeats, thirty seconds each way as the gateway offers, and reports\nits ",[273,696,697],{},"ConnectionState"," to the handler set with ",[273,700,701],{},"stateHandler",":",[704,705,706,719],"table",{},[707,708,709],"thead",{},[710,711,712,716],"tr",{},[713,714,715],"th",{},"State",[713,717,718],{},"Meaning",[720,721,722,733,745],"tbody",{},[710,723,724,730],{},[725,726,727],"td",{},[273,728,729],{},"CONNECTED",[725,731,732],{},"The gateway has accepted the connection; calls are sent as they are made.",[710,734,735,740],{},[725,736,737],{},[273,738,739],{},"RECONNECTING",[725,741,742,743,550],{},"The connection was lost and is being re-established with the backoff of the ",[273,744,468],{},[710,746,747,752],{},[725,748,749],{},[273,750,751],{},"CLOSED",[725,753,754,755,757],{},"Closed for good, by ",[273,756,642],{}," or because the attempts the options allow were spent.",[269,759,760,761,763,764,766,767,769],{},"A call pending when the connection is lost fails with an ",[273,762,519],{},": the gateway releases\neverything it held for the connection the moment it ends, so no reply can arrive on the next one (see\n",[682,765,222],{"href":223},"). A call made while the connection is ",[273,768,739],{},"\nfails the same way at once rather than waiting for the reconnect. Every reconnect authenticates again with the\nsame headers and gets a reply destination of its own; the proxies already created keep working across it. A\nreconnect retries and gives up on the same answers as the initial connect, so a gateway that rejects the credentials\non a reconnect closes the connection for good.",[269,771,772],{},"The state handler runs on the connection's context, and so does the completion of a proxy result, since replies\narrive there: a handler that blocks on a call made through the connection deadlocks it.",[287,774,776],{"className":330,"code":775,"language":332,"meta":292,"style":292},"connection.stateHandler(state -> log.info(\"Kinotic connection is {}\", state));\n\nconnection.close().await();\n",[273,777,778,783,787],{"__ignoreMap":292},[296,779,780],{"class":298,"line":299},[296,781,782],{},"connection.stateHandler(state -> log.info(\"Kinotic connection is {}\", state));\n",[296,784,785],{"class":298,"line":342},[296,786,358],{"emptyLinePlaceholder":357},[296,788,789],{"class":298,"line":348},[296,790,791],{},"connection.close().await();\n",[269,793,794],{},"Publishing services from the Java client, as the TypeScript client can, is not supported in this version.",[796,797,798],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":292,"searchDepth":342,"depth":342,"links":800},[801,802,803,804],{"id":284,"depth":342,"text":285},{"id":326,"depth":342,"text":327},{"id":526,"depth":342,"text":527},{"id":690,"depth":342,"text":691},"How a Java program outside a Kinotic cluster connects to a gateway and calls services through typed proxies.","md",null,{},{"title":84,"description":805},"_RpzHh1U1zNFg5yGrtnBppP7GeRwPn2tFb-by0WodUg",[812,814],{"title":80,"path":81,"stem":82,"description":813,"children":-1},"Real-time data streaming between services and clients.",{"title":26,"path":94,"stem":95,"description":815,"children":-1},"Kinotic's persistence layer provides declarative data management with automatic CRUD service generation from TypeScript entity definitions.",1795429957079]