Class SyslogReceivingChannelAdapterSupport
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.endpoint.MessageProducerSupport
org.springframework.integration.syslog.inbound.SyslogReceivingChannelAdapterSupport
- All Implemented Interfaces:
Aware,BeanFactoryAware,BeanNameAware,DisposableBean,InitializingBean,SmartInitializingSingleton,ApplicationContextAware,Lifecycle,Phased,SmartLifecycle,ComponentSourceAware,ExpressionCapable,MessageProducer,IntegrationPattern,NamedComponent,IntegrationInboundManagement,IntegrationManagement,ManageableLifecycle,ManageableSmartLifecycle,TrackableComponent
- Direct Known Subclasses:
TcpSyslogReceivingChannelAdapter,UdpSyslogReceivingChannelAdapter
Base support class for inbound channel adapters. The default port is 514.
- Since:
- 3.0
- Author:
- Gary Russell, Ngoc Nhan
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagement
IntegrationManagement.ManagementOverrides -
Field Summary
FieldsFields inherited from class org.springframework.integration.endpoint.AbstractEndpoint
lifecycleLockFields inherited from class org.springframework.integration.context.IntegrationObjectSupport
EXPRESSION_PARSER, loggerFields inherited from interface org.springframework.integration.support.management.IntegrationManagement
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconvertAndSend(Message<?> message) protected intgetPort()protected voidonInit()Subclasses may implement this for initialization logic.voidsetConverter(MessageConverter converter) AMessageConverterto convert the byte array payload of the underlying UDP/TCP message to a Spring Integration message with decoded payload and headers; default isDefaultMessageConverter.voidsetPort(int port) Sets the port on which the adapter listens; default is 514; note that the RFC does not specify a well known port for TCP; 514 is the well-known port for UDP.Methods inherited from class org.springframework.integration.endpoint.MessageProducerSupport
afterSingletonsInstantiated, buildErrorMessage, doStart, doStop, getErrorChannel, getErrorMessageAttributes, getErrorMessageStrategy, getIntegrationPatternType, getMessagingTemplate, getOutputChannel, getRequiredOutputChannel, isObserved, registerObservationRegistry, sendErrorMessageIfNecessary, sendMessage, setErrorChannel, setErrorChannelName, setErrorMessageStrategy, setObservationConvention, setOutputChannel, setOutputChannelName, setSendTimeout, setShouldTrack, subscribeToPublisherMethods inherited from class org.springframework.integration.endpoint.AbstractEndpoint
destroy, doStop, getPhase, getRole, isActive, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stopMethods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, 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.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.integration.support.management.IntegrationManagement
destroy, getManagedName, getManagedType, getOverrides, getThisAs, isLoggingEnabled, registerMetricsCaptor, setLoggingEnabled, setManagedName, setManagedTypeMethods inherited from interface org.springframework.integration.support.context.NamedComponent
getBeanName, getComponentName, getComponentType
-
Field Details
-
DEFAULT_PORT
protected static final int DEFAULT_PORT- See Also:
-
-
Constructor Details
-
SyslogReceivingChannelAdapterSupport
public SyslogReceivingChannelAdapterSupport()
-
-
Method Details
-
getPort
protected int getPort()- Returns:
- The port on which this adapter listens.
-
setPort
public void setPort(int port) Sets the port on which the adapter listens; default is 514; note that the RFC does not specify a well known port for TCP; 514 is the well-known port for UDP. Many admins also use 514 for TCP; see RFC-6587 for more information about TCP and RFC-3164/5424 for more information about UDP.- Parameters:
port- The port.
-
setConverter
AMessageConverterto convert the byte array payload of the underlying UDP/TCP message to a Spring Integration message with decoded payload and headers; default isDefaultMessageConverter.- Parameters:
converter- The converter.
-
onInit
protected void onInit()Description copied from class:IntegrationObjectSupportSubclasses may implement this for initialization logic.- Overrides:
onInitin classMessageProducerSupport
-
convertAndSend
-