Package org.apache.camel.component.jt400
Class Jt400Endpoint
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.support.DefaultEndpoint
-
- org.apache.camel.support.ScheduledPollEndpoint
-
- org.apache.camel.component.jt400.Jt400Endpoint
-
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.CamelContextAware,org.apache.camel.Endpoint,org.apache.camel.IsSingleton,org.apache.camel.MultipleConsumersSupport,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.HasId,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
@UriEndpoint(firstVersion="1.5.0", scheme="jt400", title="JT400", syntax="jt400:userID:password@systemName/QSYS.LIB/objectPath.type", category=MESSAGING, headersClass=Jt400Constants.class) public class Jt400Endpoint extends org.apache.camel.support.ScheduledPollEndpoint implements org.apache.camel.MultipleConsumersSupportExchanges messages with an IBM i system using data queues, message queues, or program call. IBM i is the replacement for AS/400 and iSeries servers.
-
-
Field Summary
Fields Modifier and Type Field Description static StringKEYstatic StringSENDER_INFORMATION
-
Constructor Summary
Constructors Modifier Constructor Description protectedJt400Endpoint(String endpointUri, Jt400Component component)Creates a new IBM i data queue endpoint using a default connection pool provided by the component.protectedJt400Endpoint(String endpointUri, Jt400Component component, com.ibm.as400.access.AS400ConnectionPool connectionPool)Creates a new IBM i data queue endpoint using the specified connection pool.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.camel.ConsumercreateConsumer(org.apache.camel.Processor processor)org.apache.camel.ProducercreateProducer()intgetCcsid()Jt400ConfigurationgetConfiguration()intgetCssid()Jt400Configuration.FormatgetFormat()Jt400Configuration.MessageActiongetMessageAction()protected StringgetObjectPath()Returns the fully qualified integrated file system path name of the data queue of this endpoint.intgetOutputFieldLength(int idx)Integer[]getOutputFieldsIdxArray()Integer[]getOutputFieldsLengthArray()StringgetPassword()StringgetProcedureName()intgetReadTimeout()StringgetSearchKey()Jt400Configuration.SearchTypegetSearchType()protected com.ibm.as400.access.AS400getSystem()Obtains anAS400object that connects to this endpoint.StringgetSystemName()Jt400TypegetType()StringgetUserID()booleanisFieldIdxForOuput(int idx)booleanisGuiAvailable()booleanisKeyed()booleanisMultipleConsumersSupported()booleanisSecured()booleanisSendingReply()protected voidreleaseSystem(com.ibm.as400.access.AS400 system)Releases a previously obtainedAS400object from use.voidsetCcsid(int ccsid)voidsetFieldsLength(String fieldsLength)voidsetFormat(Jt400Configuration.Format format)voidsetGuiAvailable(boolean guiAvailable)voidsetKeyed(boolean keyed)voidsetMessageAction(Jt400Configuration.MessageAction messageAction)voidsetObjectPath(String objectPath)voidsetOutputFieldsIdx(String outputFieldsIdx)voidsetOutputFieldsIdxArray(Integer[] outputFieldsIdxArray)voidsetOutputFieldsLengthArray(Integer[] outputFieldsLengthArray)voidsetPassword(String password)voidsetProcedureName(String procedureName)voidsetReadTimeout(int readTimeout)voidsetSearchKey(String searchKey)voidsetSearchType(Jt400Configuration.SearchType searchType)voidsetSecured(boolean secured)voidsetSendingReply(boolean sendingReply)voidsetSystemName(String systemName)voidsetType(Jt400Type type)voidsetUserID(String userID)-
Methods inherited from class org.apache.camel.support.ScheduledPollEndpoint
configureConsumer, configureProperties, configureScheduledPollConsumerProperties, doConfigureConsumer, doStart, doStop, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDefaultDelay, getDelay, getInitialDelay, getPollStrategy, getRepeatCount, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, isGreedy, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRepeatCount, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay
-
Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureExchange, configurePollingConsumer, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toString
-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
KEY
public static final String KEY
- See Also:
- Constant Field Values
-
SENDER_INFORMATION
public static final String SENDER_INFORMATION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Jt400Endpoint
protected Jt400Endpoint(String endpointUri, Jt400Component component) throws org.apache.camel.CamelException
Creates a new IBM i data queue endpoint using a default connection pool provided by the component.- Throws:
NullPointerException- ifcomponentis nullorg.apache.camel.CamelException
-
Jt400Endpoint
protected Jt400Endpoint(String endpointUri, Jt400Component component, com.ibm.as400.access.AS400ConnectionPool connectionPool) throws org.apache.camel.CamelException
Creates a new IBM i data queue endpoint using the specified connection pool.- Throws:
org.apache.camel.CamelException
-
-
Method Detail
-
getConfiguration
public Jt400Configuration getConfiguration()
-
createProducer
public org.apache.camel.Producer createProducer() throws Exception- Specified by:
createProducerin interfaceorg.apache.camel.Endpoint- Throws:
Exception
-
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception- Specified by:
createConsumerin interfaceorg.apache.camel.Endpoint- Throws:
Exception
-
getSystem
protected com.ibm.as400.access.AS400 getSystem()
Obtains anAS400object that connects to this endpoint. Since these objects represent limited resources, clients have the responsibility ofreleasing themwhen done.- Returns:
- an
AS400object that connects to this endpoint
-
releaseSystem
protected void releaseSystem(com.ibm.as400.access.AS400 system)
Releases a previously obtainedAS400object from use.- Parameters:
system- a previously obtainedAS400object
-
getObjectPath
protected String getObjectPath()
Returns the fully qualified integrated file system path name of the data queue of this endpoint.- Returns:
- the fully qualified integrated file system path name of the data queue of this endpoint
-
getType
public Jt400Type getType()
-
setType
public void setType(Jt400Type type)
-
getSearchKey
public String getSearchKey()
-
isKeyed
public boolean isKeyed()
-
getOutputFieldsIdxArray
public Integer[] getOutputFieldsIdxArray()
-
getCcsid
public int getCcsid()
-
setOutputFieldsIdxArray
public void setOutputFieldsIdxArray(Integer[] outputFieldsIdxArray)
-
setSearchKey
public void setSearchKey(String searchKey)
-
setOutputFieldsIdx
public void setOutputFieldsIdx(String outputFieldsIdx)
-
setKeyed
public void setKeyed(boolean keyed)
-
getOutputFieldsLengthArray
public Integer[] getOutputFieldsLengthArray()
-
setSearchType
public void setSearchType(Jt400Configuration.SearchType searchType)
-
isGuiAvailable
public boolean isGuiAvailable()
-
setFormat
public void setFormat(Jt400Configuration.Format format)
-
setFieldsLength
public void setFieldsLength(String fieldsLength)
-
getFormat
public Jt400Configuration.Format getFormat()
-
setOutputFieldsLengthArray
public void setOutputFieldsLengthArray(Integer[] outputFieldsLengthArray)
-
getCssid
public int getCssid()
-
getUserID
public String getUserID()
-
getSearchType
public Jt400Configuration.SearchType getSearchType()
-
setCcsid
public void setCcsid(int ccsid)
-
setGuiAvailable
public void setGuiAvailable(boolean guiAvailable)
-
getPassword
public String getPassword()
-
getSystemName
public String getSystemName()
-
isFieldIdxForOuput
public boolean isFieldIdxForOuput(int idx)
-
getOutputFieldLength
public int getOutputFieldLength(int idx)
-
setObjectPath
public void setObjectPath(String objectPath)
-
setPassword
public void setPassword(String password)
-
setUserID
public void setUserID(String userID)
-
setSystemName
public void setSystemName(String systemName)
-
setSecured
public void setSecured(boolean secured)
-
isSecured
public boolean isSecured()
-
getReadTimeout
public int getReadTimeout()
-
setReadTimeout
public void setReadTimeout(int readTimeout)
-
setProcedureName
public void setProcedureName(String procedureName)
-
getProcedureName
public String getProcedureName()
-
setMessageAction
public void setMessageAction(Jt400Configuration.MessageAction messageAction)
-
getMessageAction
public Jt400Configuration.MessageAction getMessageAction()
-
setSendingReply
public void setSendingReply(boolean sendingReply)
-
isSendingReply
public boolean isSendingReply()
-
isMultipleConsumersSupported
public boolean isMultipleConsumersSupported()
- Specified by:
isMultipleConsumersSupportedin interfaceorg.apache.camel.MultipleConsumersSupport
-
-