com.epam.mdp.full.context
Class PacketContext

java.lang.Object
  extended by com.epam.mdp.full.context.PacketContext
All Implemented Interfaces:
Context

public class PacketContext
extends java.lang.Object
implements Context

The packet context.


Constructor Summary
PacketContext()
           
PacketContext(java.net.URI pathToTemplates)
           
 
Method Summary
 TemplateContainer getContainer()
          Returns instance of templates container.
 Template getCurrentTemplate()
          Returns current template.
 java.net.URI getPathToTemplates()
           
 PresenceMap getPresenceMap()
          Gets presence map.
 ITypeValue getValue(Type type)
          Returns value from context by type.
 boolean isInitialized(Type type)
          Checks if initialized context dictionary for input type.
 boolean isPresentInStream()
          Checks if present current value in stream of FAST message.
 void resetDictionaries()
          Resets the context's dictionaries.
 void restorePresenceMap()
          Restores presence map.
 void savePresenceMap()
          Saves presence map.
 void setContainer(TemplateContainer templateContainer)
          Sets instance of templates container.
 void setCurrentTemplate(Template template)
          Sets input template to current.
 void setPresenceMap(PresenceMap genericPresenceMap)
          Sets instance of PresenceMap.
 void setValue(Type type, ITypeValue value)
          Sets value into context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PacketContext

public PacketContext()

PacketContext

public PacketContext(java.net.URI pathToTemplates)
Method Detail

getPathToTemplates

public java.net.URI getPathToTemplates()
Specified by:
getPathToTemplates in interface Context

setPresenceMap

public void setPresenceMap(PresenceMap genericPresenceMap)
Description copied from interface: Context
Sets instance of PresenceMap.

Specified by:
setPresenceMap in interface Context
Parameters:
genericPresenceMap - Instance of PresenceMap.
See Also:
Context.savePresenceMap()

savePresenceMap

public void savePresenceMap()
Description copied from interface: Context
Saves presence map.

Specified by:
savePresenceMap in interface Context
See Also:
Context.savePresenceMap()

setCurrentTemplate

public void setCurrentTemplate(Template template)
Description copied from interface: Context
Sets input template to current.

Specified by:
setCurrentTemplate in interface Context
Parameters:
template - Instance of template.
See Also:
Context.setCurrentTemplate(com.epam.mdp.full.template.types.Template)

getCurrentTemplate

public Template getCurrentTemplate()
Description copied from interface: Context
Returns current template.

Specified by:
getCurrentTemplate in interface Context
Returns:
Instance of current templates.
See Also:
Context.getCurrentTemplate()

resetDictionaries

public void resetDictionaries()
Description copied from interface: Context
Resets the context's dictionaries.

Specified by:
resetDictionaries in interface Context
See Also:
Context.resetDictionaries()

setValue

public void setValue(Type type,
                     ITypeValue value)
Description copied from interface: Context
Sets value into context.

Specified by:
setValue in interface Context
Parameters:
type - Type of value.
value - The value.
See Also:
Context.setValue(com.epam.mdp.full.template.types.Type, com.epam.mdp.full.template.types.value.ITypeValue)

getValue

public ITypeValue getValue(Type type)
Description copied from interface: Context
Returns value from context by type.

Specified by:
getValue in interface Context
Parameters:
type - Type of value.
Returns:
The value.
See Also:
Context.getValue(com.epam.mdp.full.template.types.Type)

getContainer

public TemplateContainer getContainer()
Description copied from interface: Context
Returns instance of templates container.

Specified by:
getContainer in interface Context
Returns:
template container
See Also:
Context.getContainer()

setContainer

public void setContainer(TemplateContainer templateContainer)
Description copied from interface: Context
Sets instance of templates container.

Specified by:
setContainer in interface Context
Parameters:
templateContainer - Instance of TemplateContainer
See Also:
Context.setContainer(com.epam.mdp.full.template.TemplateContainer)

isInitialized

public boolean isInitialized(Type type)
Description copied from interface: Context
Checks if initialized context dictionary for input type.

Specified by:
isInitialized in interface Context
Parameters:
type - Instance of Type.
Returns:
true if initialized.
See Also:
Context.isInitialized(com.epam.mdp.full.template.types.Type)

isPresentInStream

public boolean isPresentInStream()
Description copied from interface: Context
Checks if present current value in stream of FAST message.

Specified by:
isPresentInStream in interface Context
Returns:
true if present.
See Also:
Context.isPresentInStream()

restorePresenceMap

public void restorePresenceMap()
Description copied from interface: Context
Restores presence map.

Specified by:
restorePresenceMap in interface Context
See Also:
Context.restorePresenceMap()

getPresenceMap

public PresenceMap getPresenceMap()
Gets presence map.

Only for testing.



Copyright © 2000-2014 EPAM Systems. All Rights Reserved.