Package pyamf :: Class BaseContext

[hide private]
[frames] | no frames]

# Class BaseContext

source code

I hold the AMF context for en/decoding streams.

Instance Methods | [hide private]

__init__(self) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code

clear(self) Completely clears the context. | source code

reset(self) Resets the context. | source code

getObject(self, ref) Gets an object based on a reference. | source code

getObjectReference(self, obj) Gets a reference for an object. | source code

`int`

addObject(self, obj) Adds a reference to `obj`. | source code

getClassAlias(self, klass) Gets a class alias based on the supplied `klass`. | source code

__copy__(self) | source code

Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self)
(Constructor)

source code

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
  (inherited documentation)

### reset(self)

source code

Resets the context. This is subtly different to the BaseContext.clear method, which is a hard delete of the context. This method is mainly used by the remoting api to handle context clearing between requests.

### getObject(self, ref)

source code

Gets an object based on a reference.

Raises:
  - `ReferenceError` - Unknown object reference.

### getObjectReference(self, obj)

source code

Gets a reference for an object.

Raises:
  - `ReferenceError` - Object not a valid reference,

### addObject(self, obj)

source code

Adds a reference to `obj`.

Parameters:
  - `obj` (`mixed`) - The object to add to the context.
Returns: `int`
  Reference to `obj`.