Top Description Inners Fields Constructors Methods
com.sun.star.lib.uno.protocols.urp

public final Class urp

extends Object
implements IProtocol
Class Inheritance
All Implemented Interfaces
com.sun.star.lib.uno.environments.remote.IProtocol
Imports
com.sun.star.bridge.InvalidProtocolChangeException, com.sun.star.bridge.ProtocolProperty, com.sun.star.bridge.XProtocolProperties, com.sun.star.lang.DisposedException, com.sun.star.lib.uno.environments.remote.IProtocol, .Message, .ThreadId, com.sun.star.lib.uno.typedesc.MethodDescription, .TypeDescription, com.sun.star.uno.Any, .IBridge, .Type, .UnoRuntime, com.sun.star.uno.TypeClass, com.sun.star.uno.XCurrentContext, java.io.DataInput, .DataInputStream, .DataOutputStream, .IOException, .InputStream, .OutputStream, java.lang.reflect.Array, java.util.ArrayList, .Random, .StringTokenizer

This class internally relies on the availability of Java UNO type information for the interface type com.sun.star.bridge.XProtocolProperties, even though URP itself does not rely on that type.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final short
private boolean
private final boolean
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private boolean
private String
private ThreadId
private TypeDescription
private final DataInput
private final Marshal
private static final int
private static final int
private static final int
private static final int
private final Object
private String
private ThreadId
private TypeDescription
private final DataOutputStream
private final PendingRequests
private final PendingRequests
private static final int
private static final int
private static final String
private static final String
private static final String
private ThreadId
private static final String
private int
private static final Random
private final ArrayList<urp.QueuedRelease>
private int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private final Unmarshal

Constructor Summary

AccessConstructor and Description
public
urp(IBridge bridge, String attributes, InputStream input, OutputStream output)
References Deprecated IBridge is deprecated or references (maybe indirectly) at least one deprecated element.

Method Summary

Modifier and TypeMethod and Description
private void
private void
public void
init()

Implements com.sun.star.lib.uno.environments.remote.IProtocol.init.

Initializes the connection.

private static boolean
parseAttributes(String attributes)

private static boolean
private byte[]
private UrpMessage
readLongRequest(int header)

public Message
readMessage()

Implements com.sun.star.lib.uno.environments.remote.IProtocol.readMessage.

Reads a request or reply message.

private UrpMessage
readReply(int header)

private UrpMessage
readRequest(int functionId, boolean forcedSynchronous)

private UrpMessage
readShortRequest(int header)

private void
public void
private void
writeBlock(boolean flush)

private void
public void
writeReply(boolean exception, ThreadId tid, Object result)

Implements com.sun.star.lib.uno.environments.remote.IProtocol.writeReply.

Writes a reply message.

public boolean
writeRequest(String oid, TypeDescription type, String function, ThreadId tid, Object[] arguments)

Implements com.sun.star.lib.uno.environments.remote.IProtocol.writeRequest.

Writes a request message.

private boolean
writeRequest(boolean internal, String oid, TypeDescription type, String function, ThreadId tid, Object[] arguments)

private boolean
writeRequest(boolean internal, String oid, TypeDescription type, MethodDescription desc, ThreadId tid, Object[] arguments, boolean flush)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CACHE_SIZEback to summary
private static final short CACHE_SIZE
currentContextback to summary
private boolean currentContext
forceSynchronousback to summary
private final boolean forceSynchronous
HEADER_EXCEPTIONback to summary
private static final int HEADER_EXCEPTION
HEADER_FUNCTIONIDback to summary
private static final int HEADER_FUNCTIONID
HEADER_FUNCTIONID14back to summary
private static final int HEADER_FUNCTIONID14
HEADER_FUNCTIONID16back to summary
private static final int HEADER_FUNCTIONID16
HEADER_LONGHEADERback to summary
private static final int HEADER_LONGHEADER
HEADER_MOREFLAGSback to summary
private static final int HEADER_MOREFLAGS
HEADER_MUSTREPLYback to summary
private static final int HEADER_MUSTREPLY
HEADER_NEWOIDback to summary
private static final int HEADER_NEWOID
HEADER_NEWTIDback to summary
private static final int HEADER_NEWTID
HEADER_NEWTYPEback to summary
private static final int HEADER_NEWTYPE
HEADER_REQUESTback to summary
private static final int HEADER_REQUEST
HEADER_SYNCHRONOUSback to summary
private static final int HEADER_SYNCHRONOUS
initializedback to summary
private boolean initialized
inL1Oidback to summary
private String inL1Oid
inL1Tidback to summary
private ThreadId inL1Tid
inL1Typeback to summary
private TypeDescription inL1Type
inputback to summary
private final DataInput input
marshalback to summary
private final Marshal marshal
MAX_FUNCTIONID14back to summary
private static final int MAX_FUNCTIONID14
MAX_FUNCTIONID16back to summary
private static final int MAX_FUNCTIONID16
MAX_FUNCTIONID8back to summary
private static final int MAX_FUNCTIONID8
MAX_RELEASE_QUEUE_SIZEback to summary
private static final int MAX_RELEASE_QUEUE_SIZE
monitorback to summary
private final Object monitor
outL1Oidback to summary
private String outL1Oid
outL1Tidback to summary
private ThreadId outL1Tid
outL1Typeback to summary
private TypeDescription outL1Type
outputback to summary
private final DataOutputStream output
pendingInback to summary
private final PendingRequests pendingIn
pendingOutback to summary
private final PendingRequests pendingOut
PROPERTIES_FID_COMMIT_CHANGEback to summary
private static final int PROPERTIES_FID_COMMIT_CHANGE
PROPERTIES_FID_REQUEST_CHANGEback to summary
private static final int PROPERTIES_FID_REQUEST_CHANGE
PROPERTIES_FUN_COMMIT_CHANGEback to summary
private static final String PROPERTIES_FUN_COMMIT_CHANGE
PROPERTIES_FUN_REQUEST_CHANGEback to summary
private static final String PROPERTIES_FUN_REQUEST_CHANGE
PROPERTIES_OIDback to summary
private static final String PROPERTIES_OID
propertiesTidback to summary
private ThreadId propertiesTid
PROPERTY_CURRENT_CONTEXTback to summary
private static final String PROPERTY_CURRENT_CONTEXT
randomback to summary
private int random
randomGeneratorback to summary
private static final Random randomGenerator
releaseQueueback to summary
private final ArrayList<urp.QueuedRelease> releaseQueue
stateback to summary
private int state
STATE_COMMITTEDback to summary
private static final int STATE_COMMITTED
STATE_INITIALback to summary
private static final int STATE_INITIAL
STATE_INITIAL0back to summary
private static final int STATE_INITIAL0
STATE_REQUESTEDback to summary
private static final int STATE_REQUESTED
STATE_TERMINATEDback to summary
private static final int STATE_TERMINATED
STATE_WAITback to summary
private static final int STATE_WAIT
unmarshalback to summary
private final Unmarshal unmarshal

Constructor Detail

urpback to summary
public urp(IBridge bridge, String attributes, InputStream input, OutputStream output)

References Deprecated

IBridge is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Method Detail

checkSynchronousPropertyRequestback to summary
private void checkSynchronousPropertyRequest(Message message) throws IOException
handleInternalMessageback to summary
private void handleInternalMessage(Message message) throws IOException
initback to summary
public void init() throws IOException

Implements com.sun.star.lib.uno.environments.remote.IProtocol.init.

Doc from com.sun.star.lib.uno.environments.remote.IProtocol.init.

Initializes the connection.

This method must be called exactly once, after the readMessage loop has already been established.

See Also
IProtocol#init
parseAttributesback to summary
private static boolean parseAttributes(String attributes)
parseBooleanAttributeValueback to summary
private static boolean parseBooleanAttributeValue(String attribute, String value)
readBlockback to summary
private byte[] readBlock() throws IOException
readLongRequestback to summary
private UrpMessage readLongRequest(int header) throws IOException
readMessageback to summary
public Message readMessage() throws IOException

Implements com.sun.star.lib.uno.environments.remote.IProtocol.readMessage.

Doc from com.sun.star.lib.uno.environments.remote.IProtocol.readMessage.

Reads a request or reply message.

Access to this method from multiple threads must be properly synchronized.

See Also
IProtocol#readMessage
readReplyback to summary
private UrpMessage readReply(int header)
readRequestback to summary
private UrpMessage readRequest(int functionId, boolean forcedSynchronous) throws IOException
readShortRequestback to summary
private UrpMessage readShortRequest(int header) throws IOException
sendRequestChangeback to summary
private void sendRequestChange() throws IOException
terminateback to summary
public void terminate()

Implements com.sun.star.lib.uno.environments.remote.IProtocol.terminate.

See Also
IProtocol#terminate
writeBlockback to summary
private void writeBlock(boolean flush) throws IOException
writeQueuedReleasesback to summary
private void writeQueuedReleases() throws IOException
writeReplyback to summary
public void writeReply(boolean exception, ThreadId tid, Object result) throws IOException

Implements com.sun.star.lib.uno.environments.remote.IProtocol.writeReply.

Doc from com.sun.star.lib.uno.environments.remote.IProtocol.writeReply.

Writes a reply message.

See Also
IProtocol#writeReply
writeRequestback to summary
public boolean writeRequest(String oid, TypeDescription type, String function, ThreadId tid, Object[] arguments) throws IOException

Implements com.sun.star.lib.uno.environments.remote.IProtocol.writeRequest.

Doc from com.sun.star.lib.uno.environments.remote.IProtocol.writeRequest.

Writes a request message.

See Also
IProtocol#writeRequest
writeRequestback to summary
private boolean writeRequest(boolean internal, String oid, TypeDescription type, String function, ThreadId tid, Object[] arguments) throws IOException
writeRequestback to summary
private boolean writeRequest(boolean internal, String oid, TypeDescription type, MethodDescription desc, ThreadId tid, Object[] arguments, boolean flush) throws IOException
com.sun.star.lib.uno.protocols.urp back to summary

private final Class urp.QueuedRelease

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
public final boolean
public final MethodDescription
public final String
public final ThreadId
public final TypeDescription

Constructor Summary

AccessConstructor and Description
public
QueuedRelease(boolean internal, String objectId, TypeDescription type, MethodDescription method, ThreadId threadId)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

internalback to summary
public final boolean internal
methodback to summary
public final MethodDescription method
objectIdback to summary
public final String objectId
threadIdback to summary
public final ThreadId threadId
typeback to summary
public final TypeDescription type

Constructor Detail

QueuedReleaseback to summary
public QueuedRelease(boolean internal, String objectId, TypeDescription type, MethodDescription method, ThreadId threadId)