org.apache.camel.component.jt400
Class Jt400DataQueueEndpoint

java.lang.Object
  extended by org.apache.camel.support.ServiceSupport
      extended by org.apache.camel.impl.DefaultEndpoint
          extended by org.apache.camel.impl.ScheduledPollEndpoint
              extended by org.apache.camel.impl.DefaultPollingEndpoint
                  extended by org.apache.camel.component.jt400.Jt400DataQueueEndpoint
All Implemented Interfaces:
org.apache.camel.CamelContextAware, org.apache.camel.Endpoint, org.apache.camel.IsSingleton, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HasId, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

public class Jt400DataQueueEndpoint
extends org.apache.camel.impl.DefaultPollingEndpoint

AS/400 Data queue endpoint


Nested Class Summary
static class Jt400DataQueueEndpoint.Format
          Enumeration of supported data formats
static class Jt400DataQueueEndpoint.SearchType
          SearchTypes for reading from Keyed Data Queues
 
Field Summary
static String KEY
           
static String SENDER_INFORMATION
           
 
Fields inherited from class org.apache.camel.support.ServiceSupport
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
 
Constructor Summary
protected Jt400DataQueueEndpoint(String endpointUri, Jt400Component component)
          Creates a new AS/400 data queue endpoint using a default connection pool provided by the component.
protected Jt400DataQueueEndpoint(String endpointUri, Jt400Component component, com.ibm.as400.access.AS400ConnectionPool connectionPool)
          Creates a new AS/400 data queue endpoint using the specified connection pool.
 
Method Summary
 org.apache.camel.PollingConsumer createPollingConsumer()
           
 org.apache.camel.Producer createProducer()
           
protected  com.ibm.as400.access.BaseDataQueue getDataQueue()
          Deprecated. This method does not benefit from connection pooling; data queue instances should be constructed with a connection obtained by getSystem().
 Jt400DataQueueEndpoint.Format getFormat()
           
protected  String getObjectPath()
          Returns the fully qualified integrated file system path name of the data queue of this endpoint.
 String getSearchKey()
           
 Jt400DataQueueEndpoint.SearchType getSearchType()
           
protected  com.ibm.as400.access.AS400 getSystem()
          Obtains an AS400 object that connects to this endpoint.
 boolean isKeyed()
           
 boolean isSingleton()
           
protected  void releaseSystem(com.ibm.as400.access.AS400 system)
          Releases a previously obtained AS400 object from use.
 void setCcsid(int ccsid)
           
 void setFormat(Jt400DataQueueEndpoint.Format format)
           
 void setGuiAvailable(boolean guiAvailable)
           
 void setKeyed(boolean keyed)
           
 void setSearchKey(String searchKey)
           
 void setSearchType(Jt400DataQueueEndpoint.SearchType searchType)
           
 
Methods inherited from class org.apache.camel.impl.DefaultPollingEndpoint
createConsumer
 
Methods inherited from class org.apache.camel.impl.ScheduledPollEndpoint
configurePollingConsumer, configureProperties, configureScheduledPollConsumerProperties
 
Methods inherited from class org.apache.camel.impl.DefaultEndpoint
configureConsumer, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, doStart, doStop, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExchangePattern, getId, hashCode, isLenientProperties, isSynchronous, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setProperties, setSynchronous, toString
 
Methods inherited from class org.apache.camel.support.ServiceSupport
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

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

Jt400DataQueueEndpoint

protected Jt400DataQueueEndpoint(String endpointUri,
                                 Jt400Component component)
                          throws org.apache.camel.CamelException
Creates a new AS/400 data queue endpoint using a default connection pool provided by the component.

Throws:
NullPointerException - if component is null
org.apache.camel.CamelException

Jt400DataQueueEndpoint

protected Jt400DataQueueEndpoint(String endpointUri,
                                 Jt400Component component,
                                 com.ibm.as400.access.AS400ConnectionPool connectionPool)
                          throws org.apache.camel.CamelException
Creates a new AS/400 data queue endpoint using the specified connection pool.

Throws:
org.apache.camel.CamelException
Method Detail

setCcsid

public void setCcsid(int ccsid)
              throws PropertyVetoException
Throws:
PropertyVetoException

setFormat

public void setFormat(Jt400DataQueueEndpoint.Format format)

getFormat

public Jt400DataQueueEndpoint.Format getFormat()

setKeyed

public void setKeyed(boolean keyed)

isKeyed

public boolean isKeyed()

setSearchKey

public void setSearchKey(String searchKey)

getSearchKey

public String getSearchKey()

setSearchType

public void setSearchType(Jt400DataQueueEndpoint.SearchType searchType)

getSearchType

public Jt400DataQueueEndpoint.SearchType getSearchType()

setGuiAvailable

public void setGuiAvailable(boolean guiAvailable)
                     throws PropertyVetoException
Throws:
PropertyVetoException

createPollingConsumer

public org.apache.camel.PollingConsumer createPollingConsumer()
                                                       throws Exception
Specified by:
createPollingConsumer in interface org.apache.camel.Endpoint
Overrides:
createPollingConsumer in class org.apache.camel.impl.DefaultEndpoint
Throws:
Exception

createProducer

public org.apache.camel.Producer createProducer()
                                         throws Exception
Throws:
Exception

getSystem

protected com.ibm.as400.access.AS400 getSystem()
Obtains an AS400 object that connects to this endpoint. Since these objects represent limited resources, clients have the responsibility of releasing them when done.

Returns:
an AS400 object that connects to this endpoint

releaseSystem

protected void releaseSystem(com.ibm.as400.access.AS400 system)
Releases a previously obtained AS400 object from use.

Parameters:
system - a previously obtained AS400 object

getDataQueue

@Deprecated
protected com.ibm.as400.access.BaseDataQueue getDataQueue()
Deprecated. This method does not benefit from connection pooling; data queue instances should be constructed with a connection obtained by getSystem().


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

isSingleton

public boolean isSingleton()


Apache Camel