Package org.red5.io.object
Class BaseInput
java.lang.Object
org.red5.io.object.BaseInput
- Direct Known Subclasses:
Input
BaseInput represents a way to map input to a HashMap. This class is meant to be extended.
- Author:
- The Red5 Project, Luke Hubbard, Codegent Ltd (luke@codegent.com)
-
Field Summary
Modifier and TypeFieldDescriptionprotected AtomicInteger
References idprotected ConcurrentMap<Integer,
Object> References map -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static boolean
classAllowed
(String className) Checks the deserializer to see if a given class is blacklisted or not.void
Clears the mapprotected Object
getReference
(int id) Returns the object with the parameters idprotected void
storeReference
(int refId, Object newRef) Replace a referenced object with another one.protected int
storeReference
(Object obj) Store an object into a map.
-
Field Details
-
refMap
References map -
refId
References id
-
-
Constructor Details
-
BaseInput
public BaseInput()
-
-
Method Details
-
storeReference
Store an object into a map.- Parameters:
obj
- Object to store- Returns:
- reference id
-
storeReference
Replace a referenced object with another one. This is used by the AMF3 deserializer to handle circular references.- Parameters:
refId
- reference idnewRef
- replacement object
-
clearReferences
public void clearReferences()Clears the map -
getReference
Returns the object with the parameters id- Parameters:
id
- Object reference id- Returns:
- Object Object reference with given id
-
classAllowed
Checks the deserializer to see if a given class is blacklisted or not.- Parameters:
className
- class name/package- Returns:
- true if not blacklisted and false if it is blacklisted
-