Authentication
API v8.1 SP2

com.rsa.ace.techservice.udpserver
Interface AceResponse

All Known Implementing Classes:
AbstractAceResponse, AceAccessDenied, AceMsgResponse, AceNewPinResponse, AceNextCodeResponse, AceOKResponse, AceOKV2Response, AceTimeRequestResponse, AceTimeResponse

public interface AceResponse

This is the Ace Response Interface. All response classes must implement this interface. This specifies generic methods for handling responses.


Method Summary
 void buildResponsePacket()
          Builds a response packet by writing the AceResponse to the byte-buffer.
 AcePacketHeader getHeader()
          This method provides the protocol version of the response packet.
 java.net.DatagramPacket getPacket()
          This method provides the response packet.
 byte getProtocolVersion()
          This method provides the protocol version of the response packet.
 byte getResponseMsgType()
          This method provides the type of the response packet.
 int getResponseSize()
          This method provides the size of the response packet.
 int getResponseStatus()
          This method provides the status for the response packet.
 AcePacketTrailer getTrailer()
           
 void processResponse()
          Overridden to perform the actual processing of the packet.
 java.nio.ByteBuffer readResponse()
          This method implements the reading of the response packet.
 java.lang.String toString()
          Convert the response packet to a string.
 void writeResponse(java.nio.ByteBuffer buf)
          This method implements the writing of the response packet.
 

Method Detail

writeResponse

void writeResponse(java.nio.ByteBuffer buf)
                   throws AcePacketException
This method implements the writing of the response packet. Implementing classes override this method with one that writes the response bytes appropriately.

Parameters:
buf - The byte-butter to which the response is written.
Throws:
AcePacketException - If there is a problem writing the response bytes to the byte buffer.

readResponse

java.nio.ByteBuffer readResponse()
                                 throws AcePacketException
This method implements the reading of the response packet. Implementing classes override this method with one that writes the response bytes appropriately.

Parameters:
buf - The byte-butter to which the response is written.
Throws:
AcePacketException - If there is a problem writing the response bytes to the byte buffer.

processResponse

void processResponse()
                     throws AcePacketException
Overridden to perform the actual processing of the packet.

Throws:
AcePacketException

getResponseSize

int getResponseSize()
This method provides the size of the response packet. Implementing classes override this method with one that returns the response size. appropriately.

Returns:
The size of the response packet in bytes.

getResponseMsgType

byte getResponseMsgType()
This method provides the type of the response packet. Implementing classes override this method with one that returns the response type.

Returns:
The type of the response packet message.

getProtocolVersion

byte getProtocolVersion()
This method provides the protocol version of the response packet. Implementing classes override this method with one that returns the protocol version.

Returns:
The protocol version of the response packet.

getHeader

AcePacketHeader getHeader()
This method provides the protocol version of the response packet. Implementing classes override this method with one that returns the protocol version.

Returns:
The protocol version of the response packet.

getResponseStatus

int getResponseStatus()
This method provides the status for the response packet. Implementing classes override this method with one that returns response status.

Returns:
The protocol version of the response packet.

buildResponsePacket

void buildResponsePacket()
                         throws AcePacketException
Builds a response packet by writing the AceResponse to the byte-buffer.

Throws:
AcePacketException - If there is a problem writing the packet byte-buffer.

getPacket

java.net.DatagramPacket getPacket()
                                  throws AcePacketException
This method provides the response packet.

Throws:
AcePacketException - If there is a problem converting the repsonse bytes to a datagram.

getTrailer

AcePacketTrailer getTrailer()
Returns:
Returns the trailer.

toString

java.lang.String toString()
Convert the response packet to a string.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of the repsonse.

Authentication
API v8.1 SP2

Copyright © 1999 - 2011 EMC Corporation. All Rights Reserved.