org.jboss.messaging.core.persistence.impl.journal
Class JournalLargeServerMessage

java.lang.Object
  extended by org.jboss.messaging.core.message.impl.MessageImpl
      extended by org.jboss.messaging.core.server.impl.ServerMessageImpl
          extended by org.jboss.messaging.core.persistence.impl.journal.JournalLargeServerMessage
All Implemented Interfaces:
EncodingSupport, Message, LargeServerMessage, ServerMessage

public class JournalLargeServerMessage
extends ServerMessageImpl
implements LargeServerMessage

A JournalLargeServerMessage

Author:
Clebert Suconic Created 30-Sep-08 12:02:45 PM

Field Summary
 
Fields inherited from class org.jboss.messaging.core.message.impl.MessageImpl
durable, HDR_ACTUAL_EXPIRY_TIME, HDR_DUPLICATE_DETECTION_ID, HDR_FROM_CLUSTER, HDR_GROUP_ID, HDR_LAST_VALUE_NAME, HDR_ORIG_MESSAGE_ID, HDR_ORIGINAL_DESTINATION, HDR_ROUTE_TO_IDS, HDR_SCHEDULED_DELIVERY_TIME, messageID, type
 
Constructor Summary
JournalLargeServerMessage(JournalStorageManager storageManager)
           
 
Method Summary
 void addBytes(byte[] bytes)
           
 void complete()
           
 ServerMessage copy(long newID)
           
 void decode(MessagingBuffer buffer)
           
 int decrementRefCount()
           
 void deleteFile()
           
 void encode(MessagingBuffer buffer)
           
 void encodeBody(MessagingBuffer bufferOut, long start, int size)
           
protected  void finalize()
           
 int getBodySize()
           
 int getEncodeSize()
           
 long getLargeBodySize()
           
 int getMemoryEstimate()
           
 boolean isLargeMessage()
           
 void releaseResources()
          Close the files if opened
 
Methods inherited from class org.jboss.messaging.core.server.impl.ServerMessageImpl
copy, createReference, decrementDurableRefCount, getRefCount, incrementDurableRefCount, incrementRefCount, isStored, setMessageID, setStored, setType, toString
 
Methods inherited from class org.jboss.messaging.core.message.impl.MessageImpl
containsProperty, containsProperty, decodeBody, decodeProperties, encodeBody, encodeProperties, getBody, getBodyInputStream, getDestination, getExpiration, getMessageID, getPriority, getProperties, getPropertiesEncodeSize, getProperty, getProperty, getPropertyNames, getTimestamp, getType, isDurable, isExpired, putBooleanProperty, putBooleanProperty, putByteProperty, putByteProperty, putBytesProperty, putBytesProperty, putDoubleProperty, putDoubleProperty, putFloatProperty, putFloatProperty, putIntProperty, putIntProperty, putLongProperty, putLongProperty, putShortProperty, putShortProperty, putStringProperty, putStringProperty, putTypedProperties, removeProperty, removeProperty, setBody, setBodyInputStream, setDestination, setDurable, setExpiration, setPriority, setTimestamp, toMap
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.messaging.core.server.ServerMessage
copy, createReference, decrementDurableRefCount, getRefCount, incrementDurableRefCount, incrementRefCount, isStored, setMessageID, setStored
 
Methods inherited from interface org.jboss.messaging.core.message.Message
containsProperty, containsProperty, decodeBody, decodeProperties, encodeBody, encodeProperties, getBody, getBodyInputStream, getDestination, getExpiration, getMessageID, getPriority, getProperties, getPropertiesEncodeSize, getProperty, getProperty, getPropertyNames, getTimestamp, getType, isDurable, isExpired, putBooleanProperty, putBooleanProperty, putByteProperty, putByteProperty, putBytesProperty, putBytesProperty, putDoubleProperty, putDoubleProperty, putFloatProperty, putFloatProperty, putIntProperty, putIntProperty, putLongProperty, putLongProperty, putShortProperty, putShortProperty, putStringProperty, putStringProperty, putTypedProperties, removeProperty, removeProperty, setBody, setBodyInputStream, setDestination, setDurable, setExpiration, setPriority, setTimestamp, toMap
 

Constructor Detail

JournalLargeServerMessage

public JournalLargeServerMessage(JournalStorageManager storageManager)
Method Detail

addBytes

public void addBytes(byte[] bytes)
              throws java.lang.Exception
Specified by:
addBytes in interface LargeServerMessage
Throws:
java.lang.Exception

encodeBody

public void encodeBody(MessagingBuffer bufferOut,
                       long start,
                       int size)
Specified by:
encodeBody in interface Message
Overrides:
encodeBody in class MessageImpl

getBodySize

public int getBodySize()
Specified by:
getBodySize in interface Message
Overrides:
getBodySize in class MessageImpl

getLargeBodySize

public long getLargeBodySize()
Specified by:
getLargeBodySize in interface Message
Specified by:
getLargeBodySize in interface LargeServerMessage
Overrides:
getLargeBodySize in class ServerMessageImpl

getEncodeSize

public int getEncodeSize()
Specified by:
getEncodeSize in interface EncodingSupport
Specified by:
getEncodeSize in interface Message
Overrides:
getEncodeSize in class MessageImpl

encode

public void encode(MessagingBuffer buffer)
Specified by:
encode in interface EncodingSupport
Specified by:
encode in interface Message
Overrides:
encode in class MessageImpl

decode

public void decode(MessagingBuffer buffer)
Specified by:
decode in interface EncodingSupport
Specified by:
decode in interface Message
Overrides:
decode in class MessageImpl

decrementRefCount

public int decrementRefCount()
Specified by:
decrementRefCount in interface ServerMessage
Overrides:
decrementRefCount in class ServerMessageImpl

isLargeMessage

public boolean isLargeMessage()
Specified by:
isLargeMessage in interface Message
Overrides:
isLargeMessage in class ServerMessageImpl

deleteFile

public void deleteFile()
                throws MessagingException
Specified by:
deleteFile in interface LargeServerMessage
Throws:
MessagingException

getMemoryEstimate

public int getMemoryEstimate()
Specified by:
getMemoryEstimate in interface ServerMessage
Overrides:
getMemoryEstimate in class ServerMessageImpl

complete

public void complete()
              throws java.lang.Exception
Specified by:
complete in interface LargeServerMessage
Throws:
java.lang.Exception

releaseResources

public void releaseResources()
Description copied from interface: LargeServerMessage
Close the files if opened

Specified by:
releaseResources in interface LargeServerMessage

copy

public ServerMessage copy(long newID)
                   throws java.lang.Exception
Specified by:
copy in interface ServerMessage
Overrides:
copy in class ServerMessageImpl
Throws:
java.lang.Exception

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable


Copyright © 2006 JBoss Inc. All Rights Reserved.