|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.instantreality.InstantIO.Namespace
org.instantreality.InstantIO.Node
org.instantreality.InstantIO.WebNode
public final class WebNode
Allows to control the InstantIO system simply by using a web browser. The WebNode opens a web server that allows to get information about the data flow graph as well as modifying the graph, i.e. adding or removing nodes or routes.
The following example demonstrates how to open a web interface on port 8080. To access the web interface, simply start a web browser and enter the URL "http://localhost:8080/" into the address bar when the web interface is running on the same machine as the web browser. When the web interface is running on another machine, you have to replace "localhost" by the name of that machine. Do not forget to open any firewall running on the machine the web interface is running on, otherwise you won't be able to connect to the interface from other machines!
WebNode webNode = new WebNode(); webNode.setPort(8080); // The following call automatically enables the WebNode // and starts the web interface: Root.the().addNamespace(webNode);
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.instantreality.InstantIO.Namespace |
---|
Namespace.Listener |
Field Summary | |
---|---|
static Field[] |
fields
Defines the fields of the WebNode. |
Fields inherited from class org.instantreality.InstantIO.Node |
---|
NODE_DISABLED, NODE_ERROR, NODE_RUNNING, NODE_SLEEPING |
Constructor Summary | |
---|---|
WebNode()
Creates a new WebNode object. |
Method Summary | |
---|---|
java.net.InetAddress |
getAddress()
Returns the address the web server is listening at for clients. |
int |
getLogSize()
Returns the number of entries in the log. |
java.lang.String |
getPassword()
Returns the password of the web node. |
int |
getPort()
Returns the port the web server is listening at for clients. |
java.lang.String |
getUserId()
Returns the user ID of the web node. |
protected void |
initialize()
Initializes the web node. |
void |
setAddress(java.net.InetAddress address)
Sets the address the web server is listening at for clients. |
void |
setLogSize(int logSize)
Sets the number of entries in the log. |
void |
setPassword(java.lang.String password)
Sets the password of the web node. |
void |
setPort(int port)
Sets the port the web server is listening at for clients. |
void |
setUserId(java.lang.String userId)
Sets the user ID of the web node. |
protected void |
shutdown()
Shuts down the web node. |
NodeType |
type()
Returns meta information about the web node. |
Methods inherited from class org.instantreality.InstantIO.Node |
---|
addLog, getDetailedInfo, getFieldNames, getFieldValue, getLog, getShortInfo, getState, newData, setFieldValue, setState, setState, start, startInSlot, startOutSlot, stop, stopInSlot, stopOutSlot, typeName |
Methods inherited from class org.instantreality.InstantIO.Namespace |
---|
addExternalRoute, addInSlot, addListener, addNamespace, addNamespace, addOutSlot, addRoute, clear, clearExternalRoutes, clearNamespaces, clearRoutes, dirty, disable, dispose, enable, enabled, finalize, getBaseURL, getLabel, removeExternalRoute, removeInSlot, removeListener, removeNamespace, removeOutSlot, removeRoute, saveState, setBaseURL, setDirty, setFieldValues |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Field[] fields
Constructor Detail |
---|
public WebNode()
Method Detail |
---|
public void setAddress(java.net.InetAddress address)
The default value for the address is the empty string, which means that the web server listens at all available network interfaces. You have to set the address only under very rare circumstances where you want to limit the web server to a specific network interface.
address
- The address the web server is listening at.getAddress()
,
setPort(int)
,
getPort()
public java.net.InetAddress getAddress()
The default value for the address is the empty string, which means that the web server listens at all available network interfaces. You have to set the address only under very rare circumstances where you want to limit the web server to a specific network interface.
setAddress(java.net.InetAddress)
,
setPort(int)
,
getPort()
public void setPort(int port)
The port is a number between 0 and 65535, inclusively. When you specify a port number of 0 (the default), the operating system automatically selects a free port. Port numbers below 1024 are reserved for the operating system, i.e. on many systems you need to have root rights to open a web server on such a port. Ports starting at 1024 are usually available for user processes - but you have to make sure that the port number you choose is actually free!
port
- The port the web server is listening at.getPort()
,
setAddress(java.net.InetAddress)
,
getAddress()
public int getPort()
The port is a number between 0 and 65535, inclusively. When you specify a port number of 0 (the default), the operating system automatically selects a free port. Port numbers below 1024 are reserved for the operating system, i.e. on many systems you need to have root rights to open a web server on such a port. Ports starting at 1024 are usually available for user processes - but you have to make sure that the port number you choose is actually free!
setPort(int)
,
setAddress(java.net.InetAddress)
,
getAddress()
public void setUserId(java.lang.String userId)
userId
- The user ID.getUserId()
,
setPassword(java.lang.String)
,
getPassword()
public java.lang.String getUserId()
setUserId(java.lang.String)
,
setPassword(java.lang.String)
,
getPassword()
public void setPassword(java.lang.String password)
password
- The password.getPassword()
,
setUserId(java.lang.String)
,
getUserId()
public java.lang.String getPassword()
setPassword(java.lang.String)
,
setUserId(java.lang.String)
,
getUserId()
public void setLogSize(int logSize)
logSize
- The number of entries in the log.getLogSize()
public int getLogSize()
setLogSize(int)
protected void initialize()
initialize
in class Node
protected void shutdown()
shutdown
in class Node
public NodeType type()
type
in class Node
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |