|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
mil.navy.nps.bridge.AwtMulticastRelayClient
A quick applet that does local relay work for multicast. This is a bit better than a plain command line application. Lots of verbose and silly J++ comments included below.
Nested Class Summary |
Nested classes inherited from class java.applet.Applet |
java.applet.Applet.AccessibleApplet |
Nested classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
static boolean |
DEBUG
|
static java.lang.String |
DEFAULT_LOCAL_UNICAST
|
static java.lang.String |
DEFAULT_MCAST_ADDRESS
|
static java.lang.String |
DEFAULT_MCAST_PORT
|
static java.lang.String |
DEFAULT_SERVER
|
static java.lang.String |
DEFAULT_SERVER_PORT
|
protected static java.awt.TextField |
localUnicastPort
|
static boolean |
m_fStandAlone
|
static int |
MAX_PACKET_SIZE
|
protected static java.awt.TextField |
mcastRelayServer
|
protected static java.awt.TextField |
mcastRelayServerPort
|
protected static java.awt.Checkbox |
multicastCheckbox
|
protected static java.net.MulticastSocket |
multicastSocket
|
protected static java.awt.TextField |
packetCount
|
protected static java.awt.TextField |
port
|
(package private) boolean |
receivedFromLocalhostOrLAN
|
(package private) boolean |
receivedFromServer
|
protected java.net.DatagramPacket |
replyPacket
|
protected static java.awt.TextField |
sendAddress
|
protected static boolean |
sending
|
static int |
SOCKET_TIMEOUT
|
protected static java.awt.CheckboxGroup |
socketTypeRadio
|
protected static java.awt.Button |
startButton
|
protected static java.awt.Button |
stopButton
|
static int |
TIME_TO_LIVE
|
protected static java.awt.Checkbox |
unicastCheckbox
|
protected static java.net.DatagramSocket |
unicastDatagramSocket
|
Fields inherited from class java.applet.Applet |
|
Fields inherited from class java.awt.Container |
|
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
AwtMulticastRelayClient()
Main constructor, which lays out fields in the AWT. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent ae)
ActionListener for the start and stop buttons. |
static void |
debug(java.lang.String pDebugString)
Debugging output. |
void |
destroy()
|
protected void |
finalize()
|
java.lang.String |
getAppletInfo()
|
void |
init()
|
void |
itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged is the implementation of the interface ItemListener, which is used by checkboxes. |
static void |
main(java.lang.String[] args)
|
void |
paint(java.awt.Graphics g)
|
void |
relayPackets()
Does the dirty work of actually relaying the packets. |
java.lang.String |
respondToServer(java.net.DatagramSocket pSocket,
java.net.DatagramPacket pPacket,
java.net.InetAddress address,
int port)
check for hello packets from server and respond with "iAmHere" for each packet received. |
void |
start()
|
void |
stop()
|
protected static void |
trace(java.lang.String pDiagnostic)
Guaranteed debugging output. |
Methods inherited from class java.applet.Applet |
getAccessibleContext, getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus |
Methods inherited from class java.awt.Panel |
addNotify |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String DEFAULT_SERVER
public static final java.lang.String DEFAULT_SERVER_PORT
public static final java.lang.String DEFAULT_MCAST_ADDRESS
public static final java.lang.String DEFAULT_MCAST_PORT
public static final int TIME_TO_LIVE
public static final java.lang.String DEFAULT_LOCAL_UNICAST
public static final int MAX_PACKET_SIZE
public static final boolean DEBUG
public static final int SOCKET_TIMEOUT
protected java.net.DatagramPacket replyPacket
boolean receivedFromServer
boolean receivedFromLocalhostOrLAN
public static boolean m_fStandAlone
protected static java.awt.TextField mcastRelayServer
protected static java.awt.TextField mcastRelayServerPort
protected static java.awt.TextField sendAddress
protected static java.awt.TextField port
protected static java.awt.TextField localUnicastPort
protected static java.awt.TextField packetCount
protected static java.awt.CheckboxGroup socketTypeRadio
protected static java.awt.Checkbox multicastCheckbox
protected static java.awt.Checkbox unicastCheckbox
protected static boolean sending
protected static java.awt.Button startButton
protected static java.awt.Button stopButton
protected static java.net.DatagramSocket unicastDatagramSocket
protected static java.net.MulticastSocket multicastSocket
Constructor Detail |
public AwtMulticastRelayClient()
Method Detail |
public static void debug(java.lang.String pDebugString)
protected static void trace(java.lang.String pDiagnostic)
public static void main(java.lang.String[] args)
public java.lang.String getAppletInfo()
public void init()
public void destroy()
public void paint(java.awt.Graphics g)
public void start()
public void stop()
public java.lang.String respondToServer(java.net.DatagramSocket pSocket, java.net.DatagramPacket pPacket, java.net.InetAddress address, int port)
public void relayPackets()
public void actionPerformed(java.awt.event.ActionEvent ae)
actionPerformed
in interface java.awt.event.ActionListener
public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged
in interface java.awt.event.ItemListener
protected void finalize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |