org.apache.activemq.transport.multicast
Class MulticastTransport

java.lang.Object
  extended by org.apache.activemq.util.ServiceSupport
      extended by org.apache.activemq.transport.TransportSupport
          extended by org.apache.activemq.transport.TransportThreadSupport
              extended by org.apache.activemq.transport.udp.UdpTransport
                  extended by org.apache.activemq.transport.multicast.MulticastTransport
All Implemented Interfaces:
java.lang.Runnable, Service, Transport

public class MulticastTransport
extends UdpTransport

A multicast based transport.


Constructor Summary
MulticastTransport(OpenWireFormat wireFormat, java.net.URI remoteLocation)
           
 
Method Summary
protected  void bind(java.net.DatagramSocket socket, java.net.SocketAddress localAddress)
           
protected  java.net.InetSocketAddress createAddress(java.net.URI remoteLocation)
          Creates an address from the given URI
protected  CommandChannel createCommandChannel()
           
protected  DatagramHeaderMarshaller createDatagramHeaderMarshaller()
           
protected  void doStop(ServiceStopper stopper)
           
 long getKeepAliveInterval()
           
protected  java.net.InetAddress getMulticastAddress()
           
protected  java.lang.String getProtocolName()
           
protected  java.lang.String getProtocolUriScheme()
           
protected  java.net.MulticastSocket getSocket()
           
 int getTimeToLive()
           
 boolean isLoopBackMode()
           
 void setKeepAliveInterval(long keepAliveInterval)
           
 void setLoopBackMode(boolean loopBackMode)
           
protected  void setSocket(java.net.MulticastSocket socket)
           
 void setTimeToLive(int timeToLive)
           
 
Methods inherited from class org.apache.activemq.transport.udp.UdpTransport
connect, createCommandDatagramChannel, createLocalAddress, createReplayer, doStart, getBufferPool, getChannel, getCommandChannel, getDatagramSize, getLocalSocketAddress, getMinmumWireFormatVersion, getPort, getReceiveCounter, getRemoteAddress, getReplayBuffer, getReplayStrategy, getSequenceGenerator, getTargetAddress, getWireFormat, isReplayEnabled, isTrace, isUseLocalHost, oneway, oneway, resolveHostName, run, setBufferPool, setChannel, setCommandChannel, setDatagramSize, setMinmumWireFormatVersion, setPort, setReplayBuffer, setReplayEnabled, setReplayStrategy, setSequenceGenerator, setTargetEndpoint, setTrace, setUseLocalHost, toString
 
Methods inherited from class org.apache.activemq.transport.TransportThreadSupport
getStackSize, isDaemon, setDaemon, setStackSize
 
Methods inherited from class org.apache.activemq.transport.TransportSupport
asyncRequest, checkStarted, doConsume, getTransportListener, isConnected, isDisposed, isFaultTolerant, isReconnectSupported, isUpdateURIsSupported, narrow, onException, reconnect, request, request, setTransportListener, updateURIs
 
Methods inherited from class org.apache.activemq.util.ServiceSupport
addServiceListener, dispose, isStarted, isStopped, isStopping, removeServiceListener, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.activemq.transport.Transport
asyncRequest, getTransportListener, isConnected, isDisposed, isFaultTolerant, isReconnectSupported, isUpdateURIsSupported, narrow, reconnect, request, request, setTransportListener, updateURIs
 
Methods inherited from interface org.apache.activemq.Service
start, stop
 

Constructor Detail

MulticastTransport

public MulticastTransport(OpenWireFormat wireFormat,
                          java.net.URI remoteLocation)
                   throws java.net.UnknownHostException,
                          java.io.IOException
Throws:
java.net.UnknownHostException
java.io.IOException
Method Detail

getKeepAliveInterval

public long getKeepAliveInterval()

setKeepAliveInterval

public void setKeepAliveInterval(long keepAliveInterval)

isLoopBackMode

public boolean isLoopBackMode()

setLoopBackMode

public void setLoopBackMode(boolean loopBackMode)

getTimeToLive

public int getTimeToLive()

setTimeToLive

public void setTimeToLive(int timeToLive)

getProtocolName

protected java.lang.String getProtocolName()
Overrides:
getProtocolName in class UdpTransport

getProtocolUriScheme

protected java.lang.String getProtocolUriScheme()
Overrides:
getProtocolUriScheme in class UdpTransport

bind

protected void bind(java.net.DatagramSocket socket,
                    java.net.SocketAddress localAddress)
             throws java.net.SocketException
Overrides:
bind in class UdpTransport
Throws:
java.net.SocketException

doStop

protected void doStop(ServiceStopper stopper)
               throws java.lang.Exception
Overrides:
doStop in class UdpTransport
Throws:
java.lang.Exception

createCommandChannel

protected CommandChannel createCommandChannel()
                                       throws java.io.IOException
Overrides:
createCommandChannel in class UdpTransport
Throws:
java.io.IOException

getMulticastAddress

protected java.net.InetAddress getMulticastAddress()

getSocket

protected java.net.MulticastSocket getSocket()

setSocket

protected void setSocket(java.net.MulticastSocket socket)

createAddress

protected java.net.InetSocketAddress createAddress(java.net.URI remoteLocation)
                                            throws java.net.UnknownHostException,
                                                   java.io.IOException
Description copied from class: UdpTransport
Creates an address from the given URI

Overrides:
createAddress in class UdpTransport
Throws:
java.net.UnknownHostException
java.io.IOException

createDatagramHeaderMarshaller

protected DatagramHeaderMarshaller createDatagramHeaderMarshaller()
Overrides:
createDatagramHeaderMarshaller in class UdpTransport


Copyright © 2005-2011 FuseSource, Corp.. All Rights Reserved.