public interface XMLSession
extends java.rmi.Remote
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
This method can be called to inform the XMLSession that
no more XML will be transmitted.
|
java.lang.String |
getNextErrChunk()
Returns chunks of diagnostic / progress messages produced on
the server during the processing of XML submitted with
xmlSubmit().
|
Session |
getSession()
This method returns a remote reference to the underlying
GanymedeSession in use on the server.
|
ReturnVal |
xmlEnd()
This method is called by the XML client once the end of the
XML stream has been transmitted, whereupon the server will
attempt to finalize the XML transaction and return an overall
success or failure indication in the ReturnVal.
|
ReturnVal |
xmlSubmit(byte[] bytes)
This method is called repeatedly by the XML client in order to
send the next packet of XML data to the server.
|
Session getSession() throws java.rmi.RemoteException
This method returns a remote reference to the underlying GanymedeSession in use on the server.
java.rmi.RemoteExceptionReturnVal xmlSubmit(byte[] bytes) throws java.rmi.RemoteException
This method is called repeatedly by the XML client in order to send the next packet of XML data to the server. If the server has detected any errors in the already-received XML stream, xmlSubmit() may return a non-null ReturnVal with a description of the failure. Otherwise, the xmlSubmit() method will enqueue the XML data for the server's continued processing and immediately return a null value, indicating success. The xmlSubmit() method will only block if the server has filled up its internal buffers and must wait to digest more of the already submitted XML.
java.rmi.RemoteExceptionReturnVal xmlEnd() throws java.rmi.RemoteException
This method is called by the XML client once the end of the XML stream has been transmitted, whereupon the server will attempt to finalize the XML transaction and return an overall success or failure indication in the ReturnVal.
xmlEnd() only returns a success / failure indication in the returned ReturnVal. In order to get all diagnostic / progress messages explaining the success or failure, the client is obliged to maintain a thread calling getNextErrChunk() until getNextErrChunk() returns null.
java.rmi.RemoteExceptionjava.lang.String getNextErrChunk()
throws java.rmi.RemoteException
Returns chunks of diagnostic / progress messages produced on the server during the processing of XML submitted with xmlSubmit().
This call will block on the server until more message data is available and will for at least a tenth of a second while the XML is still being processed so that the client doesn't loop on getNextErrChunk() too fast.
Once this XMLSession has finished processing the submitted XML and everything in the diagnostic / progress message stream has been retrieved by calls to getNextErrChunk(), getNextErrChunk() will return null.
The XML client is meant to run a dedicated thread to repeatedly call this method to collect diagnostic / progress data until getNextErrChunk() returns null. This thread will generally last beyond the time of the XML client's xmlEnd() call.
java.rmi.RemoteExceptionvoid abort()
throws java.rmi.RemoteException
This method can be called to inform the XMLSession that no more XML will be transmitted.
java.rmi.RemoteException