Class Message
java.lang.Object
com.sun.star.lib.uno.environments.remote.Message
A remote request or reply message.
-
Constructor Summary
ConstructorsConstructorDescriptionMessage
(ThreadId threadId, boolean request, String objectId, TypeDescription type, MethodDescription method, boolean synchronous, com.sun.star.uno.XCurrentContext currentContext, boolean abnormalTermination, Object result, Object[] arguments) -
Method Summary
Modifier and TypeMethodDescriptionfinal Object[]
Returns the arguments of a message.com.sun.star.uno.XCurrentContext
Returns the current context of a request message.final MethodDescription
Returns the method description of a request message.final String
Returns the object ID of a request message.final Object
Returns the result of a reply message.final ThreadId
Returns the thread ID of the message.final TypeDescription
getType()
Returns the type of a request message.final boolean
Returns whether the reply message represents abnormal termination.final boolean
Returns whether the message is a request or a reply.final boolean
Returns whether the request message is synchronous.
-
Constructor Details
-
Message
public Message(ThreadId threadId, boolean request, String objectId, TypeDescription type, MethodDescription method, boolean synchronous, com.sun.star.uno.XCurrentContext currentContext, boolean abnormalTermination, Object result, Object[] arguments)
-
-
Method Details
-
getThreadId
Returns the thread ID of the message.Valid for all kinds of messages.
- Returns:
- the (non-
null
) thread ID.
-
isRequest
public final boolean isRequest()Returns whether the message is a request or a reply.Valid for all kinds of messages.
- Returns:
true
for a request,false
for a reply.
-
getObjectId
Returns the object ID of a request message.Valid only for request messages.
- Returns:
- the (non-
null
) object ID for a request,null
for a reply.
-
getType
Returns the type of a request message.Valid only for request messages.
- Returns:
- the (non-
null
) type for a request,null
for a reply.
-
getMethod
Returns the method description of a request message.Valid only for request messages. The returned
MethodDescription
is consistent with the type of the message.- Returns:
- the (non-
null
) method description for a request,null
for a reply.
-
isSynchronous
public final boolean isSynchronous()Returns whether the request message is synchronous.Valid only for request messages.
- Returns:
true
for a synchronous request,false
for an asynchronous request or a reply.
-
getCurrentContext
public com.sun.star.uno.XCurrentContext getCurrentContext()Returns the current context of a request message.Valid only for request messages.
- Returns:
- the current context (which may be
null
) for a request,null
for a reply.
-
isAbnormalTermination
public final boolean isAbnormalTermination()Returns whether the reply message represents abnormal termination.Valid only for reply messages.
- Returns:
true
for a reply that represents abnormal termination,false
for a reply that represents normal termination or a request.
-
getResult
Returns the result of a reply message.Valid only for reply messages.
- Returns:
- any (possibly
null
) return value for a reply that represents normal termination, the (non-null
) exception for a reply that represents abnormal termination,null
for a request.
-
getArguments
Returns the arguments of a message.Valid only for request messages and reply messages that represent normal termination. Any returned array must not be modified.
- Returns:
- the in and in– {
}out arguments for a request (possibly
null
for a parameterless function), the out and in– { }out arguments for a reply that represents normal termination (possiblynull
for a parameterless function),null
for a reply that represents abnormal termination.
-