Platform SDK Java 8.5 API Reference

com.genesyslab.platform.json.jackson2.previewinteraction
Class PreviewInteractionModule

java.lang.Object
  extended by com.fasterxml.jackson.databind.Module
      extended by com.fasterxml.jackson.databind.module.SimpleModule
          extended by com.genesyslab.platform.json.jackson2.PSDKCommonModule
              extended by com.genesyslab.platform.json.jackson2.previewinteraction.PreviewInteractionModule
All Implemented Interfaces:
com.fasterxml.jackson.core.Versioned, java.io.Serializable

public class PreviewInteractionModule
extends PSDKCommonModule

PSDK module for Jackson ObjectMapper that describes how to convert PSDK messages to/from JSON.

Example:

  // create jackson's JSONizator
  ObjectMapper mapper = new ObjectMapper();
   
  // register our new PSDK module
  mapper.registerModule( new PreviewInteractionModule() ); 
   
  // create PSDK message
  PreviewInteractionUserData request = PreviewInteractionUserData.create();
  // request.set ...
    
  // serialize message
  String json = mapper.writeValueAsString(request);
   
  // deserialize message
  PreviewInteractionUserData msg = mapper.readValue(json, PreviewInteractionUserData.class);
 
NOTE: the module changes ObjectMapper features when it is registering as shown in commented lines:
     ObjectMapper mapper = new ObjectMapper(); 
     mapper.register( new PreviewInteractionModule() );
     // mapper.setSerializationInclusion(Include.NON_NULL);
     // mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
     // mapper.setDateFormat(new ISO8601DateFormatWithMilliseconds()); 
  
so if you have own vision how it should be configured then configure it after the module will be registered.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.Module
com.fasterxml.jackson.databind.Module.SetupContext
 
Field Summary
 
Fields inherited from class com.genesyslab.platform.json.jackson2.PSDKCommonModule
enabledMessageNameSerialization
 
Fields inherited from class com.fasterxml.jackson.databind.module.SimpleModule
_abstractTypes, _deserializerModifier, _deserializers, _keyDeserializers, _keySerializers, _mixins, _name, _namingStrategy, _serializerModifier, _serializers, _subtypes, _valueInstantiators, _version
 
Constructor Summary
PreviewInteractionModule()
          Create new instance of the jackson module.
PreviewInteractionModule(boolean enableMessageNameSerialization)
          Create new instance of the jackson module.
 
Method Summary
static void init(PSDKCommonModule module)
          For internal use only
static boolean isAvailable()
          Checks if the appropriate protocol jar file is available according to the classpath.
static void setup(com.fasterxml.jackson.databind.Module.SetupContext context)
          Do not call it directly.
 void setupModule(com.fasterxml.jackson.databind.Module.SetupContext context)
          Do not call it directly.
 
Methods inherited from class com.genesyslab.platform.json.jackson2.PSDKCommonModule
createUnknownMessage, getMarkerClass, getMessageClass, isProtocolAvailable
 
Methods inherited from class com.fasterxml.jackson.databind.module.SimpleModule
addAbstractTypeMapping, addDeserializer, addKeyDeserializer, addKeySerializer, addSerializer, addSerializer, addValueInstantiator, getModuleName, registerSubtypes, registerSubtypes, setAbstractTypes, setDeserializerModifier, setDeserializers, setKeyDeserializers, setKeySerializers, setMixInAnnotation, setNamingStrategy, setSerializerModifier, setSerializers, setValueInstantiators, version
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreviewInteractionModule

public PreviewInteractionModule()
Create new instance of the jackson module.


PreviewInteractionModule

public PreviewInteractionModule(boolean enableMessageNameSerialization)
Create new instance of the jackson module.

Parameters:
enableMessageNameSerialization - flag enables message name serialization (it is disabled by default).
Method Detail

setupModule

public void setupModule(com.fasterxml.jackson.databind.Module.SetupContext context)
Do not call it directly.

Overrides:
setupModule in class PSDKCommonModule

init

public static void init(PSDKCommonModule module)
For internal use only


setup

public static void setup(com.fasterxml.jackson.databind.Module.SetupContext context)
Do not call it directly.


isAvailable

public static boolean isAvailable()
Checks if the appropriate protocol jar file is available according to the classpath.

Returns:
true if the appropriate protocol is available.

Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.