Class GraphqlEndpoint
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultEndpoint
org.apache.camel.component.graphql.GraphqlEndpoint
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.CamelContextAware,org.apache.camel.ComponentAware,org.apache.camel.Endpoint,org.apache.camel.IsSingleton,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.HasCamelContext,org.apache.camel.spi.HasId,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
@UriEndpoint(firstVersion="3.0.0",
scheme="graphql",
title="GraphQL",
syntax="graphql:httpUri",
category=API,
producerOnly=true,
lenientProperties=true)
public class GraphqlEndpoint
extends org.apache.camel.support.DefaultEndpoint
Send GraphQL queries and mutations to external systems.
-
Field Summary
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.camel.ConsumercreateConsumer(org.apache.camel.Processor processor) org.apache.camel.Producerprotected voiddoStop()org.apache.hc.client5.http.impl.classic.CloseableHttpClientorg.apache.hc.client5.http.impl.classic.CloseableHttpClientgetQuery()org.apache.camel.util.json.JsonObjectbooleanvoidsetAccessToken(String accessToken) The access token sent in the Authorization header.voidsetHttpClient(org.apache.hc.client5.http.impl.classic.CloseableHttpClient httpClient) voidsetHttpUri(URI httpUri) The GraphQL server URI.voidsetJwtAuthorizationType(String jwtAuthorizationType) The JWT Authorization type.voidsetOperationName(String operationName) The query or mutation name.voidsetPassword(String password) The password for Basic authentication.voidsetProxyHost(String proxyHost) The proxy host in the format "hostname:port".voidThe query text.voidsetQueryFile(String queryFile) The query file name located in the classpath.voidsetQueryHeader(String queryHeader) The name of a header containing the GraphQL query.voidsetUsername(String username) The username for Basic authentication.voidsetVariables(org.apache.camel.util.json.JsonObject variables) The JsonObject instance containing the operation variables.voidsetVariablesHeader(String variablesHeader) The name of a header containing a JsonObject instance containing the operation variables.Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toStringMethods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doStart, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.camel.ComponentAware
getComponentMethods inherited from interface org.apache.camel.Endpoint
getEndpointBaseUri, isSingletonProducerMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
GraphqlEndpoint
-
-
Method Details
-
doStop
- Overrides:
doStopin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
createProducer
- Throws:
Exception
-
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception - Throws:
Exception
-
getHttpclient
public org.apache.hc.client5.http.impl.classic.CloseableHttpClient getHttpclient() -
getHttpUri
-
setHttpUri
The GraphQL server URI. -
getProxyHost
-
setProxyHost
The proxy host in the format "hostname:port". -
getAccessToken
-
setAccessToken
The access token sent in the Authorization header. -
getUsername
-
setUsername
The username for Basic authentication. -
getPassword
-
setPassword
The password for Basic authentication. -
getQuery
-
setJwtAuthorizationType
The JWT Authorization type. Default is Bearer. -
getJwtAuthorizationType
-
setQuery
The query text. -
getQueryFile
-
setQueryFile
The query file name located in the classpath. -
getOperationName
-
setOperationName
The query or mutation name. -
getVariables
public org.apache.camel.util.json.JsonObject getVariables() -
setVariables
public void setVariables(org.apache.camel.util.json.JsonObject variables) The JsonObject instance containing the operation variables. -
getVariablesHeader
-
setVariablesHeader
The name of a header containing a JsonObject instance containing the operation variables. -
getQueryHeader
-
setQueryHeader
The name of a header containing the GraphQL query. -
getHttpClient
public org.apache.hc.client5.http.impl.classic.CloseableHttpClient getHttpClient() -
setHttpClient
public void setHttpClient(org.apache.hc.client5.http.impl.classic.CloseableHttpClient httpClient) -
isLenientProperties
public boolean isLenientProperties()- Specified by:
isLenientPropertiesin interfaceorg.apache.camel.Endpoint- Overrides:
isLenientPropertiesin classorg.apache.camel.support.DefaultEndpoint
-