|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.carol.cmi.smart.message.ResourceAnswer
public class ResourceAnswer
Answer to the client with the content of the resource.
| Field Summary |
|---|
| Fields inherited from interface org.ow2.carol.cmi.smart.api.Message |
|---|
HEADER_SIZE, INT_BYTE_SIZE |
| Constructor Summary | |
|---|---|
ResourceAnswer(java.nio.ByteBuffer dataBuffer)
Builds a new answer with the given bytebuffer. |
|
ResourceAnswer(java.lang.String resourceName,
byte[] bytes)
Builds a new answer with the given class name and the array of bytes. |
|
| Method Summary | |
|---|---|
protected java.lang.String |
decode(java.nio.ByteBuffer buffer)
Decode the string encoded in the bytebuffer in UTF-8 format. |
protected java.nio.ByteBuffer |
encode(java.lang.String str)
Encode the given string into a bytebuffer. |
byte[] |
getBytes()
Gets bytecode of the class. |
java.nio.ByteBuffer |
getMessage()
Gets a message to send. |
java.nio.ByteBuffer |
getMessageContent()
Gets the content of this message (only this part, not the header). |
byte |
getOperationCode()
Gets the Operation Code of this answer. |
java.lang.String |
getResourceName()
Gets the name of this resource. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceAnswer(java.lang.String resourceName,
byte[] bytes)
resourceName - the given namebytes - the array of bytes to store.public ResourceAnswer(java.nio.ByteBuffer dataBuffer)
dataBuffer - buffer containing the data to extract.| Method Detail |
|---|
public java.nio.ByteBuffer getMessage()
getMessage in interface Messagepublic byte getOperationCode()
getOperationCode in interface Messagepublic java.nio.ByteBuffer getMessageContent()
public java.lang.String getResourceName()
public byte[] getBytes()
protected java.nio.ByteBuffer encode(java.lang.String str)
str - the given string
protected java.lang.String decode(java.nio.ByteBuffer buffer)
buffer - the given buffer to analyze.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||