Package org.red5.io.object
Class BaseInput
- java.lang.Object
-
- org.red5.io.object.BaseInput
-
-
Field Summary
Fields Modifier and Type Field Description protected AtomicIntegerrefIdReferences idprotected ConcurrentMap<Integer,Object>refMapReferences map
-
Constructor Summary
Constructors Constructor Description BaseInput()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static booleanclassAllowed(String className)Checks the deserializer to see if a given class is blacklisted or not.voidclearReferences()Clears the mapprotected ObjectgetReference(int id)Returns the object with the parameters idprotected voidstoreReference(int refId, Object newRef)Replace a referenced object with another one.protected intstoreReference(Object obj)Store an object into a map.
-
-
-
Field Detail
-
refMap
protected ConcurrentMap<Integer,Object> refMap
References map
-
refId
protected AtomicInteger refId
References id
-
-
Method Detail
-
storeReference
protected int storeReference(Object obj)
Store an object into a map.- Parameters:
obj- Object to store- Returns:
- reference id
-
storeReference
protected void storeReference(int refId, Object newRef)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
protected Object getReference(int id)
Returns the object with the parameters id- Parameters:
id- Object reference id- Returns:
- Object Object reference with given id
-
classAllowed
protected static boolean classAllowed(String className)
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
-
-