public class NMJConfig
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
ADB |
static int |
ADB_QUERY
Global flag values
|
static int |
BLUETOOTH |
static int |
BT_DISCOVERABLE
Global flag values
|
static int |
CH_CLOSED
Event types
|
static int |
CH_OPENED
Event types
|
static int |
CH_REMOVED
Event types
|
static int |
CONNECTIVITY_ADB |
static int |
CONNECTIVITY_BLUETOOTH |
static int |
CONNECTIVITY_LAN |
static int |
CONNECTIVITY_USB |
static int |
CONNECTIVITY_USB_HOST |
static int |
CONNECTIVITY_WIFI |
static int |
DEL
Global flag values
|
static int |
DEL_15
Global flag values
|
static int |
DEL_30
Global flag values
|
static int |
DLG_HIDDEN
Dialog flags
|
static int |
DNS
Global flag values
|
static int |
DNS_ANNOUNCE
Global flag values
|
static int |
DNS_QUERY
Global flag values
|
static int |
DSMI |
static int |
E_ADB
Errors
|
static int |
E_BIND
Errors
|
static int |
E_BLUETOOTH
Errors
|
static int |
E_DEVICE_OPEN
Errors
|
static int |
E_LINUX_64
Errors
|
static int |
E_NETWORK
Errors
|
static int |
E_SECONDARY
Errors
|
static int |
E_USB
Errors
|
static int |
E_WIFI
Errors
|
static int |
IN |
static int |
IO |
static int |
LOOPBACK
Global flag values
|
static int |
OUT |
static int |
RAW |
static int |
RTPA |
static int |
RTPA_AUTOCONNECT
Channel flag values
|
static int |
RTPA_CH_CLIENT_CONNECT
RTP states
|
static int |
RTPA_CH_CONNECTED
RTP states
|
static int |
RTPA_CH_DISCONNECTED
RTP states
|
static int |
RTPA_CH_DISCOVERED
RTP states
|
static int |
RTPA_CH_GONE
RTP states
|
static int |
RTPA_CH_LOST
RTP states
|
static int |
RTPA_CH_PRESENT
RTP states
|
static int |
RTPA_CH_WAITING
RTP states
|
static int |
RTPA_EVENT
Event types
|
static int |
RTPA_NO_RESPONSE
RTP states
|
static int |
SHIFT_PORTS
Global flag values
|
static int |
USB
Channel flag values
|
static int |
USB_ATTACHMENT_LISTEN
Global flag values
|
| Constructor and Description |
|---|
NMJConfig() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addSystemListener(NMJSystemListener l)
Adds a listener to be informed of state changes and errors in the system.
|
static void |
breakBluetoothQuery() |
static void |
connectLocalSession(int ch,
int remoteCh)
Connects a remote session (which once discovered or added manually will have its own channel representation)
to a "local session".
|
static void |
deleteChannel(int ch) |
static void |
disconnectLocalSession(int ch,
int idx)
Disconnects a local session's remote client.
|
static java.lang.String |
getBluetoothStackAdapter() |
static java.lang.String |
getClientIP(int ch,
int id)
Returns the ip address of a client that connected to a local session
|
static java.lang.String |
getClientName(int ch,
int id)
Returns the Bonjour name of a client that connected to a local session
|
static int |
getClientPort(int ch,
int id)
Returns the port number on a client machine that connected to a local session
|
static int |
getConnectivity(java.lang.Object android_content_Context)
Android only.
This method does nothing in J2SE context and is only in the source to avoid the necessity for two separate javadoc editions. |
static int |
getFlags(int ch)
Returns global (if ch == -1) or a specific channel's control flags.
|
static int |
getIO(int ch)
Returns 0 if the given channel is set as an input, 1 for output and -1 for bidirectional channels.
|
static java.lang.String |
getIP(int ch)
Returns a channel's remote IP address.
|
static int |
getLocalPort(int ch)
Returns a channel's local port (unicast and RTP mode only).
|
static int |
getMode(int ch)
Returns the channel's general operation mode (RAW, RTPA, ADB etc.).
|
static java.lang.String |
getName(int ch) |
static int |
getNetworkAdapter(int ch)
Returns the index of the channel's explicitely set or default network interface.
|
static int |
getNumChannels()
Returns the total number of channels that the SPI is configured to provide.
|
static int |
getPort(int ch)
Returns a channel's remote port.
|
static java.lang.String |
getProperty(java.lang.String key,
java.lang.String def) |
static java.lang.String |
getVersionInfo() |
static short |
getVersionNumber(int mm) |
static void |
removeBluetoothSystemListener(NMJBluetoothSystemListener btl) |
static void |
removeSystemListener(NMJSystemListener l) |
static void |
resetAll()
Deletes all settings and reverts to the default state of two multicast channels plus one local RTP session
|
static void |
runBluetoothQuery(NMJBluetoothSystemListener btl) |
static void |
setApplicationNode(java.lang.String fullyQualifiedPackageName)
Redirects storage to an application specific preferences node.
|
static void |
setBasePort(int mode,
int p)
Sets the portnumber that local ports for RTP channels will be based on (first channel will use p and p+1, channel n will use
p+n*2 and p+n*2+1).
|
static void |
setBluetoothStackAdapter(java.lang.String fullyQualifiedClassName)
Sets the Bluetooth adapter implementation to use.
|
static void |
setBluetoothSystemListener(NMJBluetoothSystemListener btl) |
static void |
setDebugLevel(int level) |
static void |
setFlags(int ch,
int flags)
Controls additional aspects, like autoconnection settings, service discovery etc.
|
static void |
setIO(int ch,
int io)
Sets the given (multicast) channel to input (0) or output (1).
|
static void |
setIP(int ch,
java.lang.String ip)
Sets the remote IP address for the given channel (null for a local RTP session).
|
static void |
setLocalPort(int ch,
int port)
Sets the local port number for the given channel (unicast and RTP mode only).
|
static void |
setLogFile(java.io.File logFile,
boolean append) |
static void |
setMode(int ch,
int mode)
Sets a channel's operation mode.
|
static void |
setName(int ch,
java.lang.String userName) |
static void |
setNetworkAdapter(int ch,
int index)
Sets the network interface to bind sockets to by index into the enumeration returned from java.net.NetworkInterface.getNetworkInterfaces().
|
static void |
setNumChannels(int nr)
Sets the total number of channels that the SPI will provide.
|
static void |
setNumChannels(int nr,
boolean clear)
Sets the total number of channels that the SPI will provide.
|
static void |
setPort(int ch,
int port)
Sets the remote port number for the given channel.
|
static void |
setProperty(java.lang.String key,
java.lang.String value) |
static javax.swing.JDialog |
showConfigDialog(java.awt.Frame parent,
java.lang.String dialogTitle)
Deprecated.
Deprecated method, use showConfigDialog(java.awt.Frame, String, int) instead.
|
static javax.swing.JDialog |
showConfigDialog(java.awt.Frame parent,
java.lang.String dialogTitle,
int flags)
Brings up nmj's control panel as a child of the given frame (whose icon it will take) and with the given title.
|
public static final int RAW
public static final int RTPA
public static final int BLUETOOTH
public static final int DSMI
public static final int ADB
public static final int IO
public static final int IN
public static final int OUT
public static final int CH_REMOVED
public static final int CH_OPENED
public static final int CH_CLOSED
public static final int RTPA_EVENT
public static final int RTPA_NO_RESPONSE
public static final int RTPA_CH_WAITING
public static final int RTPA_CH_DISCOVERED
public static final int RTPA_CH_PRESENT
public static final int RTPA_CH_CONNECTED
public static final int RTPA_CH_CLIENT_CONNECT
public static final int RTPA_CH_DISCONNECTED
public static final int RTPA_CH_GONE
public static final int RTPA_CH_LOST
public static final int DNS_QUERY
public static final int DNS_ANNOUNCE
public static final int DNS
public static final int BT_DISCOVERABLE
public static final int LOOPBACK
public static final int ADB_QUERY
public static final int USB_ATTACHMENT_LISTEN
public static final int DEL_15
public static final int DEL_30
public static final int DEL
public static final int SHIFT_PORTS
public static final int RTPA_AUTOCONNECT
public static final int USB
public static final int E_DEVICE_OPEN
public static final int E_BIND
public static final int E_NETWORK
public static final int E_WIFI
public static final int E_BLUETOOTH
public static final int E_USB
public static final int E_SECONDARY
public static final int E_ADB
public static final int E_LINUX_64
public static final int DLG_HIDDEN
public static final int CONNECTIVITY_WIFI
public static final int CONNECTIVITY_USB
public static final int CONNECTIVITY_LAN
public static final int CONNECTIVITY_BLUETOOTH
public static final int CONNECTIVITY_ADB
public static final int CONNECTIVITY_USB_HOST
public static void setApplicationNode(java.lang.String fullyQualifiedPackageName)
public static void setNumChannels(int nr)
public static void setNumChannels(int nr,
boolean clear)
public static int getNumChannels()
public static void setIP(int ch,
java.lang.String ip)
public static java.lang.String getIP(int ch)
public static void setPort(int ch,
int port)
public static int getPort(int ch)
public static void setLocalPort(int ch,
int port)
public static int getLocalPort(int ch)
public static void setBasePort(int mode,
int p)
public static void setMode(int ch,
int mode)
public static int getMode(int ch)
public static void setNetworkAdapter(int ch,
int index)
public static int getNetworkAdapter(int ch)
public static void setIO(int ch,
int io)
public static int getIO(int ch)
public static void setFlags(int ch,
int flags)
public static int getFlags(int ch)
public static void setName(int ch,
java.lang.String userName)
public static java.lang.String getName(int ch)
public static java.lang.String getClientIP(int ch,
int id)
public static int getClientPort(int ch,
int id)
public static java.lang.String getClientName(int ch,
int id)
public static void addSystemListener(NMJSystemListener l)
public static void removeSystemListener(NMJSystemListener l)
public static void setProperty(java.lang.String key,
java.lang.String value)
public static java.lang.String getProperty(java.lang.String key,
java.lang.String def)
public static int getConnectivity(java.lang.Object android_content_Context)
public static void setBluetoothStackAdapter(java.lang.String fullyQualifiedClassName)
public static java.lang.String getBluetoothStackAdapter()
public static void setBluetoothSystemListener(NMJBluetoothSystemListener btl)
public static void removeBluetoothSystemListener(NMJBluetoothSystemListener btl)
public static void breakBluetoothQuery()
public static void runBluetoothQuery(NMJBluetoothSystemListener btl) throws java.lang.Exception
java.lang.Exceptionpublic static void deleteChannel(int ch)
public static void connectLocalSession(int ch,
int remoteCh)
throws java.lang.Exception
java.lang.Exceptionpublic static void disconnectLocalSession(int ch,
int idx)
throws java.lang.Exception
java.lang.Exceptionpublic static void resetAll()
public static java.lang.String getVersionInfo()
public static short getVersionNumber(int mm)
public static void setDebugLevel(int level)
public static void setLogFile(java.io.File logFile,
boolean append)
public static javax.swing.JDialog showConfigDialog(java.awt.Frame parent,
java.lang.String dialogTitle)
public static javax.swing.JDialog showConfigDialog(java.awt.Frame parent,
java.lang.String dialogTitle,
int flags)