Skip navigation links

Oracle® Coherence Java API Reference
v3.5

E14977-01


com.tangosol.net
Class MulticastTest

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.net.MulticastTest


public class MulticastTest
extends Base

Test multicast broadcast.

Author:
cp 2002.09.30

Nested Class Summary
 class MulticastTest.Listener
           

 

Field Summary
static java.lang.String COMMAND_ADDR_GROUP
           
static java.lang.String COMMAND_ADDR_LOCAL
           
static java.lang.String COMMAND_DELAY
           
static java.lang.String COMMAND_DISPLAY
           
static java.lang.String COMMAND_HELP
           
static java.lang.String COMMAND_TRANSLATE
           
static java.lang.String COMMAND_TTL
           
static java.lang.String DEFAULT_ADDR_GROUP
           
static java.lang.String DEFAULT_ADDR_LOCAL
           
static int DEFAULT_DELAY
           
static int DEFAULT_DISPLAY
           
static java.lang.String DEFAULT_IP_GROUP
           
static int DEFAULT_PORT
           
static int DEFAULT_TTL
           
static java.lang.String[] VALID_COMMANDS
           

 

Constructor Summary
MulticastTest(java.net.InetAddress addrIface, java.net.InetSocketAddress addrGroup, int nTTL, int cSecsDelay, int cbMax, boolean fTranslate)
          Construct the MulticastTest object.

 

Method Summary
 void displayPacket(ReadBuffer buf, java.net.InetSocketAddress addr)
           
protected  void initSocket()
          Open the multicast socket.
static void main(java.lang.String[] asArg)
          Parse and validate the command-line parameters and start the test.
 void run()
          Run the test.
protected static void showInstructions()
          Display the command-line instructions.
protected static java.net.InetAddress translateAddress(java.lang.String sAddr)
          Convert an address string to an InetAddress.
protected static java.net.InetSocketAddress translateSocketAddress(java.lang.String sAddr)
          Convert an address:port string to an InetSocketAddress.

 

Field Detail

COMMAND_HELP

public static final java.lang.String COMMAND_HELP
See Also:
Constant Field Values

COMMAND_ADDR_LOCAL

public static final java.lang.String COMMAND_ADDR_LOCAL
See Also:
Constant Field Values

COMMAND_ADDR_GROUP

public static final java.lang.String COMMAND_ADDR_GROUP
See Also:
Constant Field Values

COMMAND_TTL

public static final java.lang.String COMMAND_TTL
See Also:
Constant Field Values

COMMAND_DELAY

public static final java.lang.String COMMAND_DELAY
See Also:
Constant Field Values

COMMAND_DISPLAY

public static final java.lang.String COMMAND_DISPLAY
See Also:
Constant Field Values

COMMAND_TRANSLATE

public static final java.lang.String COMMAND_TRANSLATE
See Also:
Constant Field Values

DEFAULT_ADDR_LOCAL

public static final java.lang.String DEFAULT_ADDR_LOCAL
See Also:
Constant Field Values

DEFAULT_PORT

public static final int DEFAULT_PORT
See Also:
Constant Field Values

DEFAULT_IP_GROUP

public static final java.lang.String DEFAULT_IP_GROUP
See Also:
Constant Field Values

DEFAULT_ADDR_GROUP

public static final java.lang.String DEFAULT_ADDR_GROUP
See Also:
Constant Field Values

DEFAULT_TTL

public static final int DEFAULT_TTL
See Also:
Constant Field Values

DEFAULT_DELAY

public static final int DEFAULT_DELAY
See Also:
Constant Field Values

DEFAULT_DISPLAY

public static final int DEFAULT_DISPLAY
See Also:
Constant Field Values

VALID_COMMANDS

public static final java.lang.String[] VALID_COMMANDS

Constructor Detail

MulticastTest

public MulticastTest(java.net.InetAddress addrIface,
                     java.net.InetSocketAddress addrGroup,
                     int nTTL,
                     int cSecsDelay,
                     int cbMax,
                     boolean fTranslate)
Construct the MulticastTest object.
Parameters:
addrIface - address of the interface (NIC)
addrGroup - address of the multicast group
nTTL - TTL setting for multicast packets
cSecsDelay - number of seconds to delay between pings
cbMax - max number of bytes in the packet body to display
fTranslate - true to translate and display cluster traffic

Method Detail

main

public static void main(java.lang.String[] asArg)
Parse and validate the command-line parameters and start the test.
Parameters:
asArg - an array of command line parameters

translateAddress

protected static java.net.InetAddress translateAddress(java.lang.String sAddr)
                                                throws java.io.IOException
Convert an address string to an InetAddress.
Parameters:
sAddr - a legal address string
Returns:
a non-null InetSocketAddress object
Throws:
java.io.IOException

translateSocketAddress

protected static java.net.InetSocketAddress translateSocketAddress(java.lang.String sAddr)
                                                            throws java.net.UnknownHostException
Convert an address:port string to an InetSocketAddress.
Parameters:
sAddr - a legal address string
Returns:
a non-null InetSocketAddress object
Throws:
java.net.UnknownHostException

showInstructions

protected static void showInstructions()
Display the command-line instructions.

run

public void run()
Run the test.

initSocket

protected void initSocket()
Open the multicast socket.

displayPacket

public void displayPacket(ReadBuffer buf,
                          java.net.InetSocketAddress addr)
                   throws java.lang.Exception
Throws:
java.lang.Exception

Skip navigation links

Oracle® Coherence Java API Reference
v3.5

E14977-01


Copyright © 2000, 2009, Oracle. All rights reserved.