org.ow2.carol.cmi.smart.message
Class ProviderURLsAnswer

java.lang.Object
  extended by org.ow2.carol.cmi.smart.message.ProviderURLsAnswer
All Implemented Interfaces:
Message

public class ProviderURLsAnswer
extends java.lang.Object
implements Message

Server sends the list of provider urls to client. The new CMI team


Field Summary
 
Fields inherited from interface org.ow2.carol.cmi.smart.api.Message
HEADER_SIZE, INT_BYTE_SIZE
 
Constructor Summary
ProviderURLsAnswer(java.nio.ByteBuffer buffer)
          Create a new answer with the given buffer for the list of provider.
ProviderURLsAnswer(java.util.List<java.lang.String> providerURLs)
          Create a new answer with the given list of provider url.
 
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.
 java.nio.ByteBuffer getMessage()
          Get the 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.util.List<java.lang.String> getProviderURLs()
          Get the list of provider url.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProviderURLsAnswer

public ProviderURLsAnswer(java.nio.ByteBuffer buffer)
Create a new answer with the given buffer for the list of provider. url.

Parameters:
buffer - the given buffer.

ProviderURLsAnswer

public ProviderURLsAnswer(java.util.List<java.lang.String> providerURLs)
Create a new answer with the given list of provider url.

Parameters:
providerURLs - the given list of provider url
Method Detail

getMessage

public java.nio.ByteBuffer getMessage()
Get the message to send.

Specified by:
getMessage in interface Message
Returns:
the bytebuffer to send.

getOperationCode

public byte getOperationCode()
Gets the Operation Code of this answer.

Specified by:
getOperationCode in interface Message
Returns:
the operation code.

getMessageContent

public java.nio.ByteBuffer getMessageContent()
Gets the content of this message (only this part, not the header).

Returns:
the content of this message.

getProviderURLs

public java.util.List<java.lang.String> getProviderURLs()
Get the list of provider url.

Returns:
the list of provider url.

encode

protected java.nio.ByteBuffer encode(java.lang.String str)
Encode the given string into a bytebuffer.

Parameters:
str - the given string
Returns:
a bytebuffer with UTF-8 encoded string

decode

protected java.lang.String decode(java.nio.ByteBuffer buffer)
Decode the string encoded in the bytebuffer in UTF-8 format.

Parameters:
buffer - the given buffer to analyze.
Returns:
the decoded string


Copyright © 2008 OW2 Consortium. All Rights Reserved.