|
JACK 5.4 Application Interface | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectaos.jack.jak.core.Dci
The DCI command line functionality can be achieved in JACK code using this class.
Field Summary | |
static int |
DEBUG_CONNECT
Bitmap debug flag to be used in call to setDebug(...). |
static int |
DEBUG_MISC
Bitmap debug flag to be used in call to setDebug(...). |
static int |
DEBUG_RAWDATA
Bitmap debug flag to be used in call to setDebug(...). |
static int |
DEBUG_TRANSFER
Bitmap debug flag to be used in call to setDebug(...). |
static int |
PING_NO_RESPONSE
Ping return status indicating that there was no response to the ping request and it timed out. |
static int |
PING_NOT_READY
Ping return status indicating that there is no local portal present in the current process yet. |
static int |
PING_OK
Ping return status indicating that the given agent responded correctly. |
static int |
PING_TIMEOUT
The number of milliseconds before timeout for a standard ping. |
static int |
PING_UNKNOWN_NAME
Ping return status indicating that the given agent is not known at the given portal (or the local portal if no portal was specified in the name). |
static int |
PING_UNKNOWN_PORTAL
Ping return status indicating that the given portal is not known at the current (local) portal. |
Constructor Summary | |
Dci()
|
Method Summary | |
static void |
connect(java.lang.String local_name,
java.lang.String remote_name,
java.lang.String rdesc)
This method can be called at any time to establish a connection. |
static void |
create(java.lang.String name,
java.lang.String desc)
Creates a new portal for this process. |
static aos.dci.Addressable |
findAddressable(java.lang.String name)
|
static java.lang.String |
getHost()
Return the hostname of the first Portal in this process. |
static java.lang.String |
getName()
Return the name of the first Portal in this process. |
static int |
getPort()
Return the port number of the first Portal in this process. |
static void |
initCommsObject(java.lang.String portal_type,
CommsObject obj)
Provide an object implementing the CommsObject interface
to the low level portal initialization code. |
static int |
multiPing(java.lang.String addressable,
int timeout,
int period)
One ping is attempted and if it was unsuccessful, more are attempted 'period' milliseconds apart until 'timeout' occurs. |
static boolean |
multiPingOk(java.lang.String addressable)
One ping is attempted and if it was unsuccessful, more are attempted '1000' milliseconds apart until 'timeout' occurs. |
static boolean |
multiPingOk(java.lang.String addressable,
int timeout,
int period)
One ping is attempted and if it was unsuccessful, more are attempted 'period' milliseconds apart until 'timeout' occurs. |
static void |
nameserver(java.lang.String ns)
This method can be called at any time to establish a new, additional nameserver. |
static int |
ping(java.lang.String addressable)
One ping. |
static boolean |
pingOk(java.lang.String addressable)
Convenience form of ping method that returns a simple true/false success status. |
static java.lang.String |
pingStatusString(int status)
Returns a descriptive (english) error string when given an integer ping return status. |
static java.lang.String |
query(java.lang.String portal)
Query a portal for a colon separated list of all known agents. |
static void |
setDaemon(boolean val)
Set whether or not the Portal receiving thread becomes a deamon thread. |
static void |
setDebug(int value)
Enable tracing on the local Portal. |
static void |
setPriority(int val)
Set the increase (or decrease) in thread priority for the portal receiving thread. |
static void |
setTimeout(int value)
This method can be called at any time to change the timeout period for the next connection request. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int PING_NO_RESPONSE
public static final int PING_NOT_READY
public static final int PING_UNKNOWN_PORTAL
public static final int PING_UNKNOWN_NAME
public static final int PING_OK
public static final int PING_TIMEOUT
public static final int DEBUG_CONNECT
public static final int DEBUG_TRANSFER
public static final int DEBUG_MISC
public static final int DEBUG_RAWDATA
Constructor Detail |
public Dci()
Method Detail |
public static void setDebug(int value)
public static void setDaemon(boolean val)
public static void setPriority(int val)
public static void setTimeout(int value)
value
- The new timeout period.public static void create(java.lang.String name, java.lang.String desc)
name
- The name of the portal.desc
- The description String containing host:port.
This method needs to be called before the first
agent is created.public static void connect(java.lang.String local_name, java.lang.String remote_name, java.lang.String rdesc)
local_name
- The local portal requesting the connection.remote_name
- The portal to connect to.public static void nameserver(java.lang.String ns)
public static aos.dci.Addressable findAddressable(java.lang.String name)
public static java.lang.String pingStatusString(int status)
public static boolean pingOk(java.lang.String addressable)
addressable
- The address of the agent to ping.
public static int ping(java.lang.String addressable)
addressable
- The address of the agent to ping.
public static boolean multiPingOk(java.lang.String addressable)
addressable
- The agent to ping.
public static boolean multiPingOk(java.lang.String addressable, int timeout, int period)
addressable
- The agent to pingtimeout
- The number of milliseconds to wait until timing out.period
- The time between pings.
public static int multiPing(java.lang.String addressable, int timeout, int period)
addressable
- The agent to pingtimeout
- The number of milliseconds to wait until timing out.period
- The time between pings.
public static java.lang.String query(java.lang.String portal)
public static java.lang.String getHost()
public static int getPort()
public static java.lang.String getName()
public static void initCommsObject(java.lang.String portal_type, CommsObject obj)
CommsObject
interface
to the low level portal initialization code.
Currently this is only implemented for "UDP" which
requires a CommsObject
whose createCommsObject(Object o)
method must
accept an Integer
object containing the port
number and return a DatagramSocket
object
bound to the given port number. This is most useful when
the method returns an object derived from DatagramSocket
enabling the user to log or modify the communications behaviour.
portal_type
- The type of portal, currently only "UDP".obj
- The CommsObject
.
|
JACK 5.4 Application Interface | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
US Government Restricted Rights
The JACK Modules and relevant Software Material have been developed entirely at private expense and are accordingly provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of DFARS 252.227-7013 or subparagraph (c)(1) and (2) of the Commercial Computer Software Restricted Rights and 48 CFR 52.2270-19, as applicable.