Spring Integration

org.springframework.integration.ip.udp
Class MulticastReceivingChannelAdapter

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.endpoint.AbstractEndpoint
          extended by org.springframework.integration.endpoint.MessageProducerSupport
              extended by org.springframework.integration.ip.AbstractInternetProtocolReceivingChannelAdapter
                  extended by org.springframework.integration.ip.udp.UnicastReceivingChannelAdapter
                      extended by org.springframework.integration.ip.udp.MulticastReceivingChannelAdapter
All Implemented Interfaces:
Runnable, BeanFactoryAware, BeanNameAware, InitializingBean, Lifecycle, Phased, SmartLifecycle, NamedComponent, MessageProducer, TrackableComponent, CommonSocketOptions

public class MulticastReceivingChannelAdapter
extends UnicastReceivingChannelAdapter

Channel adapter that joins a multicast group and receives incoming packets and sends them to an output channel.

Since:
2.0
Author:
Gary Russell

Field Summary
protected  String group
           
 
Fields inherited from class org.springframework.integration.ip.udp.UnicastReceivingChannelAdapter
mapper, socket, soSendBufferSize
 
Fields inherited from class org.springframework.integration.ip.AbstractInternetProtocolReceivingChannelAdapter
active, listening, localAddress, poolSize, port, receiveBufferSize, soReceiveBufferSize, soTimeout, taskExecutor
 
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
logger
 
Constructor Summary
MulticastReceivingChannelAdapter(String group, int port)
          Constructs a MulticastReceivingChannelAdapter that listens for packets on the specified multichannel address (group) and port.
MulticastReceivingChannelAdapter(String group, int port, boolean lengthCheck)
          Constructs a MulticastReceivingChannelAdapter that listens for packets on the specified multichannel address (group) and port.
 
Method Summary
protected  DatagramSocket getSocket()
           
 
Methods inherited from class org.springframework.integration.ip.udp.UnicastReceivingChannelAdapter
asyncSendMessage, doStop, receive, run, sendAck, setSoSendBufferSize
 
Methods inherited from class org.springframework.integration.ip.AbstractInternetProtocolReceivingChannelAdapter
checkTaskExecutor, doStart, getLocalAddress, getPort, isListening, setLocalAddress, setPoolSize, setReceiveBufferSize, setSoReceiveBufferSize, setSoTimeout, setTaskExecutor
 
Methods inherited from class org.springframework.integration.endpoint.MessageProducerSupport
onInit, sendMessage, setOutputChannel, setSendTimeout, setShouldTrack
 
Methods inherited from class org.springframework.integration.endpoint.AbstractEndpoint
getPhase, isAutoStartup, isRunning, setAutoStartup, setPhase, setTaskScheduler, start, stop, stop
 
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, getBeanFactory, getComponentName, getComponentType, getConversionService, getRequiredMetadataPersister, getTaskScheduler, setBeanFactory, setBeanName, setComponentName, setConversionService, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.integration.context.NamedComponent
getComponentName, getComponentType
 

Field Detail

group

protected String group
Constructor Detail

MulticastReceivingChannelAdapter

public MulticastReceivingChannelAdapter(String group,
                                        int port)
Constructs a MulticastReceivingChannelAdapter that listens for packets on the specified multichannel address (group) and port.

Parameters:
group - The multichannel address.
port - The port.

MulticastReceivingChannelAdapter

public MulticastReceivingChannelAdapter(String group,
                                        int port,
                                        boolean lengthCheck)
Constructs a MulticastReceivingChannelAdapter that listens for packets on the specified multichannel address (group) and port. Enables setting the lengthCheck option, which expects a length to precede the incoming packets.

Parameters:
group - The multichannel address.
port - The port.
lengthCheck - If true, enables the lengthCheck Option.
Method Detail

getSocket

protected DatagramSocket getSocket()
Overrides:
getSocket in class UnicastReceivingChannelAdapter

Spring Integration

Copyright © 2010. All Rights Reserved.