Class AbstractInternetProtocolReceivingChannelAdapter
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.endpoint.MessageProducerSupport
org.springframework.integration.ip.AbstractInternetProtocolReceivingChannelAdapter
- All Implemented Interfaces:
- Runnable,- Aware,- BeanFactoryAware,- BeanNameAware,- DisposableBean,- InitializingBean,- SmartInitializingSingleton,- ApplicationContextAware,- ApplicationEventPublisherAware,- Lifecycle,- Phased,- SmartLifecycle,- ComponentSourceAware,- ExpressionCapable,- MessageProducer,- IntegrationPattern,- CommonSocketOptions,- NamedComponent,- IntegrationInboundManagement,- IntegrationManagement,- ManageableLifecycle,- ManageableSmartLifecycle,- TrackableComponent,- SchedulingAwareRunnable
- Direct Known Subclasses:
- UnicastReceivingChannelAdapter
public abstract class AbstractInternetProtocolReceivingChannelAdapter
extends MessageProducerSupport
implements ApplicationEventPublisherAware, SchedulingAwareRunnable, CommonSocketOptions
Base class for inbound TCP/UDP Channel Adapters.
- Since:
- 2.0
- Author:
- Mark Fisher, Gary Russell, Artem Bilan
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagementIntegrationManagement.ManagementOverrides
- 
Field SummaryFields inherited from class org.springframework.integration.endpoint.AbstractEndpointlifecycleLockFields inherited from class org.springframework.integration.context.IntegrationObjectSupportEXPRESSION_PARSER, loggerFields inherited from interface org.springframework.integration.support.management.IntegrationManagementMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEFields inherited from interface org.springframework.context.SmartLifecycleDEFAULT_PHASE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidcheckTaskExecutor(String threadName) Creates a default task executor if none was supplied.protected voiddoStart()Take no action by default.protected voiddoStop()Take no action by default.protected ApplicationEventPublisherintgetPort()intintintbooleanvoidsetApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) voidsetListening(boolean listening) voidsetLocalAddress(String localAddress) On a multi-homed system, specifies the ip address of the network interface used to communicate.voidsetPoolSize(int poolSize) voidsetReceiveBufferSize(int receiveBufferSize) voidsetSoReceiveBufferSize(int soReceiveBufferSize) voidsetSoTimeout(int soTimeout) voidsetTaskExecutor(Executor taskExecutor) Methods inherited from class org.springframework.integration.endpoint.MessageProducerSupportafterSingletonsInstantiated, buildErrorMessage, getErrorChannel, getErrorMessageAttributes, getErrorMessageStrategy, getIntegrationPatternType, getMessagingTemplate, getOutputChannel, getRequiredOutputChannel, isObserved, onInit, registerObservationRegistry, sendErrorMessageIfNecessary, sendMessage, setErrorChannel, setErrorChannelName, setErrorMessageStrategy, setObservationConvention, setOutputChannel, setOutputChannelName, setSendTimeout, setShouldTrack, subscribeToPublisherMethods inherited from class org.springframework.integration.endpoint.AbstractEndpointdestroy, doStop, getPhase, getRole, isActive, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stopMethods inherited from class org.springframework.integration.context.IntegrationObjectSupportafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentDescription, getComponentName, getComponentSource, getComponentType, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentDescription, setComponentName, setComponentSource, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.integration.ip.CommonSocketOptionssetSoSendBufferSizeMethods inherited from interface org.springframework.integration.support.management.IntegrationManagementdestroy, getManagedName, getManagedType, getOverrides, getThisAs, isLoggingEnabled, registerMetricsCaptor, setLoggingEnabled, setManagedName, setManagedTypeMethods inherited from interface org.springframework.integration.support.context.NamedComponentgetBeanName, getComponentName, getComponentTypeMethods inherited from interface org.springframework.scheduling.SchedulingAwareRunnablegetQualifier, isLongLived
- 
Constructor Details- 
AbstractInternetProtocolReceivingChannelAdapterpublic AbstractInternetProtocolReceivingChannelAdapter(int port) 
 
- 
- 
Method Details- 
getPortpublic int getPort()- Returns:
- The port on which this receiver is listening.
 
- 
setSoTimeoutpublic void setSoTimeout(int soTimeout) - Specified by:
- setSoTimeoutin interface- CommonSocketOptions
- Parameters:
- soTimeout- The timeout, in milliseconds.
- See Also:
 
- 
getSoTimeoutpublic int getSoTimeout()- Returns:
- the soTimeout
 
- 
setSoReceiveBufferSizepublic void setSoReceiveBufferSize(int soReceiveBufferSize) - Specified by:
- setSoReceiveBufferSizein interface- CommonSocketOptions
- Parameters:
- soReceiveBufferSize- The receive buffer size.
- See Also:
 
- 
getSoReceiveBufferSizepublic int getSoReceiveBufferSize()- Returns:
- the soReceiveBufferSize
 
- 
setReceiveBufferSizepublic void setReceiveBufferSize(int receiveBufferSize) 
- 
getReceiveBufferSizepublic int getReceiveBufferSize()- Returns:
- the receiveBufferSize
 
- 
isListeningpublic boolean isListening()
- 
setListeningpublic void setListening(boolean listening) - Parameters:
- listening- the listening to set
 
- 
getLocalAddress
- 
setLocalAddressDescription copied from interface:CommonSocketOptionsOn a multi-homed system, specifies the ip address of the network interface used to communicate. For inbound adapters and gateways, specifies the interface used to listed for incoming connections. If omitted, the endpoint will listen on all available adapters. For the UDP multicast outbound adapter specifies the interface to which multicast packets will be sent. For UDP unicast and multicast adapters, specifies which interface to which the acknowledgment socket will be bound. Does not apply to TCP outbound adapters and gateways.- Specified by:
- setLocalAddressin interface- CommonSocketOptions
- Parameters:
- localAddress- The local address.
 
- 
setPoolSizepublic void setPoolSize(int poolSize) 
- 
setTaskExecutor
- 
getTaskExecutor- Returns:
- the taskExecutor
 
- 
getApplicationEventPublisher
- 
setApplicationEventPublisher- Specified by:
- setApplicationEventPublisherin interface- ApplicationEventPublisherAware
 
- 
doStartprotected void doStart()Description copied from class:MessageProducerSupportTake no action by default. Subclasses may override this if they need lifecycle-managed behavior. Protected by 'lifecycleLock'.- Overrides:
- doStartin class- MessageProducerSupport
 
- 
checkTaskExecutorCreates a default task executor if none was supplied.- Parameters:
- threadName- The thread name.
 
- 
doStopprotected void doStop()Description copied from class:MessageProducerSupportTake no action by default. Subclasses may override this if they need lifecycle-managed behavior.- Overrides:
- doStopin class- MessageProducerSupport
 
 
-