org.apache.directory.shared.kerberos.components
Class LastReq

java.lang.Object
  extended by org.apache.directory.shared.asn1.AbstractAsn1Object
      extended by org.apache.directory.shared.kerberos.components.LastReq
All Implemented Interfaces:
org.apache.directory.shared.asn1.Asn1Object

public class LastReq
extends org.apache.directory.shared.asn1.AbstractAsn1Object

The LastReq structure. The ASN.1 grammar is :

 LastReq         ::=     SEQUENCE OF SEQUENCE {
         lr-type         [0] Int32,
         lr-value        [1] KerberosTime
 }
 

Author:
Apache Directory Project

Constructor Summary
LastReq()
          Creates a new instance of LastReq.
 
Method Summary
 void addEntry(LastReqEntry lastReqEntry)
          Add a new LastReqEntry
 int computeLength()
          Compute the LastReq length
 void createNewLR()
          Create a new currentLR
 ByteBuffer encode(ByteBuffer buffer)
          Encode the LastReq message to a PDU.
 LastReqEntry getCurrentLR()
           
 LastReqType getCurrentLrType()
           
 KerberosTime getCurrentLrValue()
           
 List<LastReqEntry> getLastReqs()
           
 void setCurrentLrType(LastReqType lrType)
          Set the CurrentLr type
 void setCurrentLrValue(KerberosTime lrValue)
          Set the CurrentLr value
 String toString()
           
 String toString(String tabs)
           
 
Methods inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object
addLength, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LastReq

public LastReq()
Creates a new instance of LastReq.

Method Detail

getCurrentLrType

public LastReqType getCurrentLrType()
Returns:
the CurrentLr type

setCurrentLrType

public void setCurrentLrType(LastReqType lrType)
Set the CurrentLr type


getCurrentLrValue

public KerberosTime getCurrentLrValue()
Returns:
the CurrentLr value

setCurrentLrValue

public void setCurrentLrValue(KerberosTime lrValue)
Set the CurrentLr value


getCurrentLR

public LastReqEntry getCurrentLR()
Returns:
the CurrentLR

createNewLR

public void createNewLR()
Create a new currentLR


addEntry

public void addEntry(LastReqEntry lastReqEntry)
Add a new LastReqEntry

Parameters:
lastReqEntry - The enry to add

getLastReqs

public List<LastReqEntry> getLastReqs()
Returns:
the LastReqs

computeLength

public int computeLength()
Compute the LastReq length
 LastReq :
 
 0x30 L1 LastReq
  |
  +--> 0x30 L2 
        |
        +--> 0xA0 L3 lr-type tag
        |     |
        |     +--> 0x02 L3-1 lrType (int)
        |
        +--> 0xA1 0x11 lr-value tag
              |
              +--> 0x18 0x0F ttt (KerberosString)
  


encode

public ByteBuffer encode(ByteBuffer buffer)
                  throws org.apache.directory.shared.asn1.EncoderException
Encode the LastReq message to a PDU.
 LastReq :
 
 0x30 LL
   0x30 LL
     0xA0 LL 
       0x02 0x01 lrType
     0xA1 0x11 
       0x18 0x0F lrValue
 

Specified by:
encode in interface org.apache.directory.shared.asn1.Asn1Object
Overrides:
encode in class org.apache.directory.shared.asn1.AbstractAsn1Object
Parameters:
buffer - The buffer where to put the PDU. It should have been allocated before, with the right size.
Returns:
The constructed PDU.
Throws:
org.apache.directory.shared.asn1.EncoderException

toString

public String toString(String tabs)
See Also:
Object.toString()

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.