|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectproper.core.ProperObject
proper.remote.messages.Message
proper.remote.messages.DataMessage
public class DataMessage
This class encapsulates a DataMessage, where the data of the payload (file or
something like this) is in the <body> tag of the Message.
The actual data looks like this:
... <body> <data> <line>...</line> ... </data> </body> ...
Message
Field Summary | |
---|---|
static java.lang.String |
DATA
the data tag |
static java.lang.String |
LINE
the status tag |
Fields inherited from class proper.remote.messages.Message |
---|
BODY, FROM, HEADER, IP, MESSAGE, PORT, TYPE |
Fields inherited from interface proper.core.ProperInterface |
---|
VERSION |
Constructor Summary | |
---|---|
DataMessage()
initializes the object |
|
DataMessage(Message msg)
initializes the object with the given Message |
|
DataMessage(java.io.Reader reader)
initializes the object with the given xml data |
Method Summary | |
---|---|
void |
clearBody()
sets the body back to standard |
Element |
getData()
returns the Data tag |
java.lang.String |
getLine(int index)
returns the specified line |
int |
getLineCount()
returns the number of stored lines |
java.util.Vector |
getLines()
returns the lines of the data |
boolean |
isOtherMessage(Message msg)
checks whether this message is of a different type, is used to determine whether the body has to be cleared if the data is copied from another Message |
static void |
main(java.lang.String[] args)
for testing only |
void |
setLines(java.io.Reader reader)
sets the lines with the content of the given reader |
void |
setLines(java.lang.String filename)
sets the lines with the content of the given file |
void |
setLines(java.util.Vector lines)
sets the given lines in the message |
Methods inherited from class proper.remote.messages.Message |
---|
clear, getBody, getBodyContent, getContent, getContent, getContent, getContent, getContent, getHeader, getIP, getPort, getType, setBodyContent, setContent, setIP, setPort, setType, toString |
Methods inherited from class proper.core.ProperObject |
---|
addListener, addOutput, classInVerbose, debugprint, debugprint, debugprint, debugprint, debugprintln, debugprintln, debugprintln, debugprintln, debugprintln, getListeners, getRuntime, getVerbose, getVerboseLevel, getVerboseLevelForClass, getVerboseString, getVerboseStringForClass, notifyListener, notifyListeners, print, print, print, print, println, println, println, println, println, printMemory, removeListener, setOutput, setVerbose, setVerboseLevel, setVerboseString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DATA
public static final java.lang.String LINE
Constructor Detail |
---|
public DataMessage()
public DataMessage(java.io.Reader reader)
public DataMessage(Message msg)
Method Detail |
---|
public boolean isOtherMessage(Message msg)
DataMessage(Message)
,
clearBody()
public void clearBody()
clearBody
in class Message
public Element getData()
public java.util.Vector getLines()
public int getLineCount()
public java.lang.String getLine(int index)
public void setLines(java.util.Vector lines)
public void setLines(java.lang.String filename)
public void setLines(java.io.Reader reader)
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |