com.adobe.flashaccess.sdk.protocol.compatibility
Class FMRMSv1MetadataHandler

java.lang.Object
  extended by com.adobe.flashaccess.sdk.protocol.compatibility.FMRMSv1MetadataHandler
All Implemented Interfaces:
HandlerInterface

public class FMRMSv1MetadataHandler
extends java.lang.Object
implements HandlerInterface

FMRMS 1.x metadata conversion request/response handler. The handler reads metadata from an InputStream and parses the request when parseRequest() is called. The request contains metadata information packaged in media generated by FMRMS 1.x. When a 2.0 client encounters this kind of media it sends the metadata to the server to be converted to Flash Access 2.0 format. See MetaDataConverter for details on the metadata conversion workflow.


Constructor Summary
FMRMSv1MetadataHandler(java.io.InputStream in, java.io.OutputStream out)
          Instantiate a Flash Access Handler for new metadata requests and responses.
 
Method Summary
 void close()
          Sends the updated metadata.
 LiveCycleKeyMetaData getOriginalMetaData()
          Returns original FMRMS 1.x metadata.
 void parseRequest()
          Parse metadata from request.
 void setUpdatedMetadata(byte[] metadata)
          The Flash Access v2 metadata, obtained using V2KeyMetaData.getContentMetadataBytes() This method takes a byte[] instead of V2KeyMetaData object to allow customers to convert and store the metadata ahead of time.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FMRMSv1MetadataHandler

public FMRMSv1MetadataHandler(java.io.InputStream in,
                              java.io.OutputStream out)
Instantiate a Flash Access Handler for new metadata requests and responses. The handler reads FMRMS 1.x metadata information from an InputStream and sends the updated metadata on the OutputStream when the close() method is called.

Parameters:
in - stream containing request body
out - stream to which response will be written
Method Detail

parseRequest

public void parseRequest()
                  throws HandlerParsingException
Parse metadata from request.

Specified by:
parseRequest in interface HandlerInterface
Throws:
HandlerParsingException - if the resquest cannot be parsed

getOriginalMetaData

public LiveCycleKeyMetaData getOriginalMetaData()
Returns original FMRMS 1.x metadata.

Returns:
metadata found in request

setUpdatedMetadata

public void setUpdatedMetadata(byte[] metadata)
The Flash Access v2 metadata, obtained using V2KeyMetaData.getContentMetadataBytes() This method takes a byte[] instead of V2KeyMetaData object to allow customers to convert and store the metadata ahead of time.

Parameters:
metadata - Flash Access v2 metadata

close

public void close()
           throws java.io.IOException
Sends the updated metadata.

Specified by:
close in interface HandlerInterface
Throws:
java.io.IOException


[an error occurred while processing this directive] [an error occurred while processing this directive]