org.apache.ignite.internal

## Class MarshallerContextAdapter

- java.lang.Object
- - org.apache.ignite.internal.MarshallerContextAdapter

All Implemented Interfaces:
  MarshallerContext

Direct Known Subclasses:
  MarshallerContextImpl

    public abstract class MarshallerContextAdapter
    extends Object
    implements MarshallerContext

Marshaller context adapter.

### Constructor Summary

Constructors
Constructor and Description
`MarshallerContextAdapter()` Initializes context.

### Method Summary

Methods
`protected abstract String` `className(int id)` Gets class name by type ID.
`Class` `getClass(int id, ClassLoader ldr)` Gets class for provided type ID.
`boolean` `registerClass(int id, Class cls)` Registers class with provided type ID.
`protected abstract boolean` `registerClassName(int id, String clsName)` Registers class name.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### MarshallerContextAdapter

    public MarshallerContextAdapter()

Initializes context.

### Method Detail

#### registerClass

    public boolean registerClass(int id,
                        Class cls)

Registers class with provided type ID.

Specified by:
  `registerClass` in interface `MarshallerContext`
Parameters:
  `id` - Type ID.
  `cls` - Class.
Returns:
  Whether class was registered.

#### getClass

    public Class getClass(int id,
                 ClassLoader ldr)
                   throws ClassNotFoundException

Gets class for provided type ID.

Specified by:
  `getClass` in interface `MarshallerContext`
Parameters:
  `id` - Type ID.
  `ldr` - Class loader.
Returns:
  Class.
Throws:
  `ClassNotFoundException` - If class was not found.

#### registerClassName

    protected abstract boolean registerClassName(int id,
                            String clsName)

Registers class name.

Parameters:
  `id` - Type ID.
  `clsName` - Class name.
Returns:
  Whether class name was registered.

#### className

    protected abstract String className(int id)

Gets class name by type ID.

Parameters:
  `id` - Type ID.
Returns:
  Class name.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0-RC3
Release Date | : March 24 2015