| Constructor and Description |
|---|
urp(IBridge bridge,
java.lang.String attributes,
java.io.InputStream input,
java.io.OutputStream output) |
| Modifier and Type | Method and Description |
|---|---|
void |
init()
Initializes the connection.
|
Message |
readMessage()
Reads a request or reply message.
|
void |
terminate() |
void |
writeReply(boolean exception,
ThreadId tid,
java.lang.Object result)
Writes a reply message.
|
boolean |
writeRequest(java.lang.String oid,
TypeDescription type,
java.lang.String function,
ThreadId tid,
java.lang.Object[] arguments)
Writes a request message.
|
public urp(IBridge bridge,
java.lang.String attributes,
java.io.InputStream input,
java.io.OutputStream output)
public void init()
throws java.io.IOException
IProtocolThis method must be called exactly once, after the
readMessage loop has already been established.
public Message readMessage() throws java.io.IOException
IProtocolAccess to this method from multiple threads must be properly synchronized.
readMessage in interface IProtocoljava.io.IOException is thrown insteadjava.io.IOExceptionpublic boolean writeRequest(java.lang.String oid,
TypeDescription type,
java.lang.String function,
ThreadId tid,
java.lang.Object[] arguments)
throws java.io.IOException
IProtocolwriteRequest in interface IProtocoloid - a non-null OIDtype - a non-null UNO typefunction - a non-null function (the name of a UNO interface method
or attribute compatible with the given type, or either
"queryInterface" or "release")arguments - a list of UNO arguments compatible with the given
type and function; may be null to represent
an empty listtrue if the request message is sent as a synchronous
requestjava.io.IOExceptionpublic void writeReply(boolean exception,
ThreadId tid,
java.lang.Object result)
throws java.io.IOException
IProtocolwriteReply in interface IProtocolexception - true if the reply corresponds to a raised
exceptiontid - a non-null TIDresult - if exception is true, a non-null
UNO exception; otherwise, a UNO return value, which may be null to
represent a VOID return valuejava.io.IOException