ants.dante
Class DanteClient
java.lang.Object
|
+--ants.core.Entity
|
+--ants.core.Application
|
+--ants.dante.DanteClient
- public final class DanteClient
- extends Application
- implements DanteConstants, java.lang.Runnable
Sends periodic keep-alive messages to the core node in order to
resubscribe to its address.
DanteClient accepts the following arguments:
-node X.Y.Z.W --- the active network address of the core node to join
-physical --- the physical address of the core node
-protocol --- the protocol with which to contact the core
-testcount --- number of refresh packets to send before exiting. Testing Only.
- Author:
- Andrew Whitaker
Fields inherited from interface ants.dante.DanteConstants |
DANTE_CLIENT_PORT,
DANTE_SERVER_PORT,
DANTE_VERSION,
ERROR,
INIT,
JOIN,
KEEP_ALIVE_FREQUENCY,
LEAVE,
MAX_FAILURES,
REFRESH,
RESPONSE,
TIMEOUT,
UNDEFINED |
Method Summary |
void |
receive(Capsule c)
Callback for packets that are delivered to this application. |
void |
run()
|
void |
setArgs(KeyArgs k)
Parse command line arguments for this application. |
void |
setHalt(boolean h)
|
void |
start()
Start this Application rolling. |
Methods inherited from class ants.core.Application |
getDefaultResources,
getDefaultTTL,
getNode,
getNodeAddress,
getPort,
getPrincipal,
send,
send,
setDefaultResources,
setDefaultTTL,
thisNode,
toString |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
DanteClient
public DanteClient()
start
public void start()
throws edu.utah.janos.nodeos.NoSuchNodeAddress,
java.lang.Exception
- Description copied from class: Application
- Start this Application rolling. This is invoked once by the
Node after it has been initialized.
Note that implementations of start should just set things up. If
the application wants to do things like send packets, this
function should start a new thread to do that. Creating a GUI
and associating callbacks is a good thing to do here.
XXX mostly stuff that could just be done in the no-arg
constructor, no?
- Overrides:
- start in class Application
setArgs
public void setArgs(KeyArgs k)
throws InvalidKeyArgsException
- Description copied from class: Application
- Parse command line arguments for this application.
Understands the -port option and the -principal option.
It is guaranteed that this method will be invoked
before the application starts running (i.e. shortly
after the constructor is invoked).
XXX A security issue related to this method is that a
mallicious application could change its parameters by
invoking this method after startup. For example, the
application could change its principal to "Administrator".
To avoid any pitfalls, the local copies of the argument
variables should be ignored once control is given over to
the application's start method
- Overrides:
- setArgs in class Application
- Tags copied from class: Application
- See Also:
#port
,
KeyArgs
setHalt
public void setHalt(boolean h)
receive
public void receive(Capsule c)
- Description copied from class: Application
- Callback for packets that are delivered to this application.
This does nothing, so the default behavior for the application
is to drop delivered packets on the floor.
- Overrides:
- receive in class Application
- Tags copied from class: Application
- Parameters:
cap
- the Capsule that got delivered. XXX state of Xdr?
run
public void run()
- Specified by:
- run in interface java.lang.Runnable
This documentation is Copyright (C) 1998-2001 The University of Utah and the University of Washington. All Rights Reserved. See the individual source files for distribution terms.
Documentation, software, and mailing lists for ANTS v2.0 can be found at the Janos Project: http://www.cs.utah.edu/flux/janos/