public abstract class MessageReader
extends java.lang.Object
Constructor and Description |
---|
MessageReader()
creates a message reader that by default will throw an OLcRemoteException if
a message error is sent on the server.
|
MessageReader(boolean throwerror)
creates a message reader
|
Modifier and Type | Method and Description |
---|---|
abstract long |
charcountsinceStartMessage() |
abstract java.lang.String |
endrecord()
stops recording and sends back a string of all the message received since the
beginning of the recording
|
MessageArrayLine |
getArrayNextLine() |
java.lang.String |
getCurrentElementPath() |
MessageElement |
getNextElement()
END OF PROCESSING OF ARRAY
|
boolean |
hasArrayNextLine()
This convenience method should be called inside the while statement of a loop
that reads all lines of the compact array.
|
boolean |
isInMessage() |
protected abstract MessageElement |
parseNextElement() |
java.lang.String |
returnBufferTrace()
Returns the last elements read in order to be used in error handling.
|
boolean |
returnNextBooleanField(java.lang.String name)
This method will execute correctly if the next element is a boolean field of
the given name, or else,throw a RuntimeException
|
java.util.Date |
returnNextDateField(java.lang.String name)
This method will execute correctly if the next element is a date field of the
given name, or else,throw a RuntimeException
|
java.math.BigDecimal |
returnNextDecimalField(java.lang.String name) |
void |
returnNextEndMessage()
This method will execute correctly if the next element is a message end, or
else,throw a RuntimeException
|
void |
returnNextEndStructure(java.lang.String structuretoclose)
This method will execute correctly if the next element is a structure end of
the specified name, or else,throw a RuntimeException
|
int |
returnNextIntegerField(java.lang.String name)
This method will execute correctly if the next element is an Integer field of
the given name, or else,throw a RuntimeException
|
SFile |
returnNextLargeBinary(java.lang.String name)
This method will execute correctly if the next element is a LargeBinary field
of the given name, or else,throw a RuntimeException
|
void |
returnNextMessageStart()
This method will execute correctly if the next element is a message start, or
else,throw a RuntimeException
|
MessageArrayStart |
returnNextMessageStartArray(java.lang.String arrayname) |
java.lang.String |
returnNextStartStructure()
This method will execute correctly if the next element is a structure start,
or else,throw a RuntimeException
|
void |
returnNextStartStructure(java.lang.String structurename)
This method will execute correctly if the next element is a structure start
if the given structurename, or else,throw a RuntimeException
|
java.lang.String |
returnNextStringField(java.lang.String name)
This method will execute correctly if the next element is a String field of
the given name, or else,throw a RuntimeException
|
abstract void |
startrecord()
starts recording the message being received.
|
void |
startStructureArray(java.lang.String arrayname)
PROCESSING OF STRUCTURE ARRAY
|
boolean |
structureArrayHasNextElement(java.lang.String arrayname) |
public MessageReader()
public MessageReader(boolean throwerror)
throwerror
- true if the reader will throw an error when encountering a
MessageError Element,public java.lang.String returnBufferTrace()
public void startStructureArray(java.lang.String arrayname) throws OLcRemoteException, java.io.IOException
OLcRemoteException
java.io.IOException
public boolean structureArrayHasNextElement(java.lang.String arrayname) throws OLcRemoteException, java.io.IOException
arrayname
- OLcRemoteException
java.io.IOException
public MessageElement getNextElement() throws OLcRemoteException, java.io.IOException
OLcRemoteException
java.io.IOException
public void returnNextMessageStart() throws OLcRemoteException, java.io.IOException
OLcRemoteException
- if an error is received from the other partyjava.io.IOException
- for any communication issue with the other partypublic void returnNextEndMessage() throws OLcRemoteException, java.io.IOException
OLcRemoteException
- if an error is received from the other partyjava.io.IOException
- for any communication issue with the other partyprotected abstract MessageElement parseNextElement() throws OLcRemoteException, java.io.IOException
OLcRemoteException
java.io.IOException
public java.lang.String returnNextStartStructure() throws OLcRemoteException, java.io.IOException
OLcRemoteException
- if an error is received from the other partyjava.io.IOException
- for any communication issue with the other partypublic void returnNextStartStructure(java.lang.String structurename) throws OLcRemoteException, java.io.IOException
structurename
- name of the elementOLcRemoteException
- if an error is received from the other partyjava.io.IOException
- for any communication issue with the other partypublic void returnNextEndStructure(java.lang.String structuretoclose) throws OLcRemoteException, java.io.IOException
structuretoclose
- name of the elementOLcRemoteException
- if an error is received from the other partyjava.io.IOException
- for any communication issue with the other partypublic java.util.Date returnNextDateField(java.lang.String name) throws OLcRemoteException, java.io.IOException
name
- name of the elementOLcRemoteException
- if an error is received from the other partyjava.io.IOException
- for any communication issue with the other partypublic java.lang.String returnNextStringField(java.lang.String name) throws OLcRemoteException, java.io.IOException
name
- name of the elementOLcRemoteException
- if an error is received from the other partyjava.io.IOException
- for any communication issue with the other partypublic SFile returnNextLargeBinary(java.lang.String name) throws OLcRemoteException, java.io.IOException
name
- name of the elementOLcRemoteException
- if an error is received from the other partyjava.io.IOException
- for any communication issue with the other partypublic int returnNextIntegerField(java.lang.String name) throws OLcRemoteException, java.io.IOException
name
- name of the elementOLcRemoteException
- if an error is received from the other partyjava.io.IOException
- for any communication issue with the other partypublic boolean returnNextBooleanField(java.lang.String name) throws OLcRemoteException, java.io.IOException
name
- name of the elementOLcRemoteException
- if an error is received from the other partyjava.io.IOException
- for any communication issue with the other partypublic java.lang.String getCurrentElementPath()
public boolean isInMessage()
public abstract long charcountsinceStartMessage()
public java.math.BigDecimal returnNextDecimalField(java.lang.String name) throws OLcRemoteException, java.io.IOException
OLcRemoteException
java.io.IOException
public abstract void startrecord()
public abstract java.lang.String endrecord()
public MessageArrayStart returnNextMessageStartArray(java.lang.String arrayname) throws OLcRemoteException, java.io.IOException
arrayname
- name of the compact array structureOLcRemoteException
- if the remote party encounters an error while
processing the messagejava.io.IOException
- if any communication issue is encounteredpublic boolean hasArrayNextLine() throws OLcRemoteException, java.io.IOException
OLcRemoteException
- if the remote party encounters an error while
processing the messagejava.io.IOException
- if any communication issue is encounteredpublic MessageArrayLine getArrayNextLine()