|
ElVis Java Interface | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sv.graph.DataSource
An application that provides data for display must register with ElVis. The application only sends data to one copy of the program. The application does not know about any of the collaborators. The collaboration server will forward the data to collaborating programs. ElVis has a window where the user selects which data sources to receive.
Field Summary | |
static int |
DEFAULT_PORT
|
Constructor Summary | |
DataSource()
|
|
DataSource(java.lang.String sourceName,
java.lang.String inUser,
java.lang.String inID)
Define the application that will send data to ElVis. |
Method Summary | |
boolean |
appendFile(java.lang.String filename)
Append to a GraphWindow file. |
boolean |
closeFile()
Close the currently open GraphWindow file. |
boolean |
closeFile(boolean poll)
Close the currently open GraphWindow file and specify client polling. |
void |
closeWindows()
Close all the GraphWindows being displayed. |
boolean |
createFile(java.lang.String filename)
Create a GraphWindow file. |
void |
exit()
|
boolean |
match(ElVisSource source)
|
boolean |
matchExact(ElVisSource source)
|
void |
read(java.io.DataInputStream in)
|
boolean |
register()
Register the application with ElVis on the local computer and the default port. |
boolean |
register(java.lang.String name,
java.lang.String port)
Register the application with ElVis. |
void |
sendData(java.lang.String host,
int port,
byte[] b)
|
void |
write(GraphWindow gw)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEFAULT_PORT
Constructor Detail |
public DataSource()
public DataSource(java.lang.String sourceName, java.lang.String inUser, java.lang.String inID)
sourceName
- - The name of the application.inUser
- - The name of user running the application.inID
- - A text string for identifying an aspect or password of the run of the application.Method Detail |
public boolean register()
public boolean register(java.lang.String name, java.lang.String port)
name
- - The name of the computer running ElVis. If name is null then use the Java system property elvis.host as the computer running ElVis. If elvis.host is not defined then use the local computer.port
- - The "well-known" port number reserved for connecting to ElVis. If port is null then use the Java system property elvis.port. If elvis.port is not defined then use the default port.public void sendData(java.lang.String host, int port, byte[] b)
public void closeWindows()
public void write(GraphWindow gw)
public boolean createFile(java.lang.String filename)
DataSource dataSource = new DataSource(); boolean gwStatus = dataSource.createFile("sample.gw"); boolean status = dataSource.register(); drawGraph(); // calls to ElVis methods to create graphs. dataSource.closeFile();
filename
- - The name of the file to create.public boolean appendFile(java.lang.String filename)
filename
- - The name of the file to append.public boolean closeFile()
public boolean closeFile(boolean poll)
public void read(java.io.DataInputStream in)
public void exit()
public boolean match(ElVisSource source)
public boolean matchExact(ElVisSource source)
|
ElVis Java Interface | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |