|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjadex.standalone.transport.codecs.CodecFactory
public class CodecFactory
The factory for codecs.
| Field Summary | |
|---|---|
protected Map |
codeccache
The codec cache (id -> codec instance). |
protected Map |
codecclasses
The mapping (id -> codec class). |
protected byte |
default_id
The default codec id. |
| Constructor Summary | |
|---|---|
CodecFactory()
Create a new codec factory. |
|
| Method Summary | |
|---|---|
void |
addCodec(Class codec_class)
Add a new codec. |
byte |
getCodecId(Class codec_class)
Get the codec id for a codec class. |
IDecoder |
getDecoder(byte id)
Create a new default decoder. |
byte |
getDefaultCodecId()
Get the default decoder/encoder id. |
IDecoder |
getDefaultDecoder()
Create a new default decoder. |
IEncoder |
getDefaultEncoder()
Create a new default encoder. |
IEncoder |
getEncoder(byte id)
Create a new default encoder. |
void |
removeCodec(Class codec_class)
Remove a codec via its id. |
void |
setDefaultCodec(Object codec)
Set the default decoder/encoder id. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map codecclasses
protected Map codeccache
protected byte default_id
| Constructor Detail |
|---|
public CodecFactory()
| Method Detail |
|---|
public IEncoder getDefaultEncoder()
public IDecoder getDefaultDecoder()
public IEncoder getEncoder(byte id)
public IDecoder getDecoder(byte id)
public void setDefaultCodec(Object codec)
id - The id.public byte getDefaultCodecId()
id - The id.public void addCodec(Class codec_class)
codec_id - The codec_id.codec_class - The codec class.public void removeCodec(Class codec_class)
id - The codec id.public byte getCodecId(Class codec_class)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||