org.ow2.easybeans.component.smartclient.message
Class AbsNameMessage

java.lang.Object
  extended by org.ow2.easybeans.component.smartclient.message.AbsMessage
      extended by org.ow2.easybeans.component.smartclient.message.AbsNameMessage
All Implemented Interfaces:
Message
Direct Known Subclasses:
ClassNotFound, ClassRequest, ProviderURLAnswer, ResourceNotFound, ResourceRequest

public abstract class AbsNameMessage
extends AbsMessage

Abstract class that can be used to exchange a message with a name inside.

Author:
Florent Benoit

Field Summary
 
Fields inherited from interface org.ow2.easybeans.component.smartclient.api.Message
HEADER_SIZE, INT_BYTE_SIZE
 
Constructor Summary
AbsNameMessage(java.nio.ByteBuffer dataBuffer)
          Builds a message by using the data contains in the bytebuffer.
AbsNameMessage(java.lang.String name)
          Builds a new message with the given name.
 
Method Summary
 java.lang.String getName()
          Gets the name of this message.
abstract  byte getOpCode()
          Gets the OpCode of this message.
 java.nio.ByteBuffer getSubMessage()
          Gets the content of this message (only this part, not the header).
 
Methods inherited from class org.ow2.easybeans.component.smartclient.message.AbsMessage
decode, encode, getMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbsNameMessage

public AbsNameMessage(java.lang.String name)
Builds a new message with the given name.

Parameters:
name - the given name

AbsNameMessage

public AbsNameMessage(java.nio.ByteBuffer dataBuffer)
Builds a message by using the data contains in the bytebuffer.

Parameters:
dataBuffer - the data of the message to extract.
Method Detail

getName

public java.lang.String getName()
Gets the name of this message.

Returns:
the name of this message.

getOpCode

public abstract byte getOpCode()
Gets the OpCode of this message.

Specified by:
getOpCode in interface Message
Specified by:
getOpCode in class AbsMessage
Returns:
the operation code.

getSubMessage

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

Specified by:
getSubMessage in class AbsMessage
Returns:
the content of this message.


Copyright © 2006-2007 OW2 Consortium. All Rights Reserved.