org.javagroups.service.lease
Class DenyResponseHeader

java.lang.Object
  |
  +--org.javagroups.Header
        |
        +--org.javagroups.service.lease.DenyResponseHeader
All Implemented Interfaces:
java.lang.Cloneable, java.io.Externalizable, java.io.Serializable

public class DenyResponseHeader
extends Header

Message header that represents deny response. This header contains denial reason and entity that requested a lease. This allows redirect response on client side to that entity.

Author:
Roman Rokytskyy (rrokytskyy@acm.org)
See Also:
Serialized Form

Field Summary
static int CANCEL_DENIED
           
static java.lang.String HEADER_KEY
           
static int LEASE_DENIED
           
static int NONE
           
static int RENEW_DENIED
           
 
Fields inherited from class org.javagroups.Header
HDR_OVERHEAD
 
Constructor Summary
DenyResponseHeader()
          Create uninitialized instance of this class.
DenyResponseHeader(int headerType, java.lang.String denialReason, java.lang.Object tenant)
          Create instance of this class for specified denial type and denial reason.
 
Method Summary
 java.lang.String getDenialReason()
          Get reason why lease was denied.
 java.lang.Object getTenant()
          Get tenant to which this response is addressed to
 int getType()
          Get type of lease request.
 void readExternal(java.io.ObjectInput in)
          Read state of this object from object input.
 void writeExternal(java.io.ObjectOutput out)
          Write state of this object into object output.
 
Methods inherited from class org.javagroups.Header
size, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HEADER_KEY

public static final java.lang.String HEADER_KEY
See Also:
Constant Field Values

NONE

public static final int NONE
See Also:
Constant Field Values

LEASE_DENIED

public static final int LEASE_DENIED
See Also:
Constant Field Values

RENEW_DENIED

public static final int RENEW_DENIED
See Also:
Constant Field Values

CANCEL_DENIED

public static final int CANCEL_DENIED
See Also:
Constant Field Values
Constructor Detail

DenyResponseHeader

public DenyResponseHeader()
Create uninitialized instance of this class. This constructor is used for implementation of Externalizable interface. There is no other way to set state of this object except reading it from object input using readExternal(java.io.ObjectInput) method.


DenyResponseHeader

public DenyResponseHeader(int headerType,
                          java.lang.String denialReason,
                          java.lang.Object tenant)
Create instance of this class for specified denial type and denial reason.

Method Detail

getType

public int getType()
Get type of lease request.


getDenialReason

public java.lang.String getDenialReason()
Get reason why lease was denied.


getTenant

public java.lang.Object getTenant()
Get tenant to which this response is addressed to


readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Read state of this object from object input.

java.io.IOException
java.lang.ClassNotFoundException

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Write state of this object into object output.

java.io.IOException


Copyright ? 2001,2002 www.javagroups.com . All Rights Reserved.