|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1) E10653-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.svcmsg.ServiceMessage
public class ServiceMessage
This class carries service message that contains either requests from SvcMsgSender
to SvcMsgReceiver
, or returning responses from SvcMsgReceiver
to SvcMsgSender
.
Requests and responses must be serializable objects (java.io.Serializable
). Usually requests are objects that implement oracle.svcmsg.Request
and responses those that implement oracle.svcmsg.Response
.
Constructor Summary | |
---|---|
ServiceMessage() Constructs a blank service message. |
|
ServiceMessage(java.lang.String name) Constructs a blank service message with the given name. |
Method Summary | |
---|---|
void |
addRequest(java.io.Serializable req) Adds a request to the request list. |
void |
addRequestWithKey(java.lang.Object key, java.io.Serializable req) Adds a request to the request list and then puts it in the by-key hash map. |
void |
addResponse(java.io.Serializable res) Adds a request to the response list. |
void |
addResponseWithKey(java.lang.Object key, java.io.Serializable res) Adds a response to the response list and then puts it in the by-key hash map. |
void |
clear() Clears the service message. |
protected void |
clearEntries() Clears request and response arrays. |
ServiceMessage |
copyTo(ServiceMessage copy) Copies the content of this message to copy . |
java.lang.String |
getName() Returns the service message name. |
java.io.Serializable |
getRequestByKey(java.lang.Object key) Gets the request by its key. |
java.util.List |
getRequests() Returns the requests as a List . |
java.io.Serializable |
getResponseByKey(java.lang.Object key) Gets the response by its key. |
java.util.List |
getResponses() Returns the responses as a List . |
void |
insertReponseWityKey(int index, java.lang.Object key, java.io.Serializable res) Inserts a response at a specific index position and then puts it in the by-key hash map. |
void |
insertRequest(int index, java.io.Serializable req) Inserts a request at a specific index position. |
void |
insertRequestWithKey(int index, java.lang.Object key, java.io.Serializable req) Inserts a request at a specific index position and then puts it in the by-key hash map. |
void |
insertResponse(int index, java.io.Serializable res) Inserts a response at a specific index position. |
void |
removeRequest(int index) Removes the request at the specified postion. |
void |
removeRequestByKey(java.lang.Object key) Removes the request by its key. |
void |
removeResponse(int index) Removes the response at the specified postion. |
void |
removeResponseByKey(java.lang.Object key) Removes the response by its key. |
java.util.Iterator |
requestElements() Returns an iterator through request objects from the by-key hash map. |
java.util.Iterator |
requestKeys() Returns an iterator through request keys of the by-key hash map. |
java.util.Iterator |
responseElements() Returns an iterator through response objects from the by-key hash map. |
java.util.Iterator |
responseKeys() Returns an iterator through response keys of the by-key hash map. |
void |
setName(java.lang.String name) Sets the service message name. |
protected void |
setRequests(java.util.List requests) Sets the request array list. |
protected void |
setResponses(java.util.List responses) Sets the response array list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServiceMessage()
public ServiceMessage(java.lang.String name)
name
- the service message name.Method Detail |
---|
public java.lang.String getName()
null
if a name was not given to the service message.public void setName(java.lang.String name)
name
- the service message name.protected void clearEntries()
public void clear()
clearEntries()
to clear requests/responses. Then, it resets the service message name to null
.public ServiceMessage copyTo(ServiceMessage copy)
copy
. It copies requests, responses, and the name.copy
- the destination of the copy operation.copy
object.public java.util.List getRequests()
List
.public java.util.List getResponses()
List
.protected void setRequests(java.util.List requests)
requests
- the request list to set the service message's request array list.protected void setResponses(java.util.List responses)
responses
- the response list to set the service message's response array list.public void addRequest(java.io.Serializable req)
req
- the request object.public void addRequestWithKey(java.lang.Object key, java.io.Serializable req)
key
- the request key.req
- the request object.public void addResponse(java.io.Serializable res)
res
- the response object.public void addResponseWithKey(java.lang.Object key, java.io.Serializable res)
key
- the response key.res
- the response object.public java.io.Serializable getRequestByKey(java.lang.Object key)
null
if the key is not found.public java.io.Serializable getResponseByKey(java.lang.Object key)
null
if the key is not found.public void insertRequest(int index, java.io.Serializable req)
index
- the index at which the request is to be inserted.req
- the request object.public void insertRequestWithKey(int index, java.lang.Object key, java.io.Serializable req)
index
- the index at which the request is to be inserted.key
- the request key.req
- the request object.public void insertResponse(int index, java.io.Serializable res)
index
- the index at which the response is to be inserted.res
- the response object.public void insertReponseWityKey(int index, java.lang.Object key, java.io.Serializable res)
index
- the index at which the response is to be inserted.key
- the response key.res
- the response object.public void removeRequest(int index)
index
- the position at which the request is to be removed.public void removeRequestByKey(java.lang.Object key)
key
- the request key.public void removeResponse(int index)
index
- the position at which the response is to be removed.public void removeResponseByKey(java.lang.Object key)
key
- the response key.public java.util.Iterator requestKeys()
public java.util.Iterator requestElements()
public java.util.Iterator responseKeys()
public java.util.Iterator responseElements()
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1) E10653-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |