|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--submarine.core.Channel
Un Channel est l'implémentation d'une chaîne complète de transformation.
Un Channel réalise les taches suivantes :
Inner Class Summary | |
private class |
Channel.ErrorListener
Classe locale pour la réception des erreurs de transformations XSL. |
Field Summary | |
private EAISystem |
eai
L'instance de EAISystem gérant ce Channel. |
ChannelInfos |
infos
Les informations qui définissent le Channel. initilisée par init(ChannelInfos) .
|
java.lang.String |
name
Le nom du Channel. |
private Serializer |
parser
L'instance de type Serializer utilisé pour l'étape de parsing. |
private static int |
S_DONE
|
private static int |
S_INIT
|
private static int |
S_PARSE
|
private static int |
S_SERIALIZE
|
private static int |
S_WRITE
|
private static int |
S_XSLTRANSFORM
|
private Serializer |
serializer
L'instance de type Serializer utilisé pour l'étape de serialisation. |
int |
step
Gives the current step in executing the channel process. usefull to build a string message on failure. |
static java.lang.String[] |
stepMessages
Gives the equivalent messages string to the steps. |
private WritingFunction |
writer
L'instance de WritingFunction utilisé pour émettre le message vers le destinataire. |
private java.util.Vector |
xslMessages
messages de type String remplis par le ErrorListener et vidé avant chaque traitement |
private javax.xml.transform.Templates |
xslTemplate
le template pour la transformation. |
Constructor Summary | |
Channel(EAISystem _eai)
Contructeur utiliser par EAISystem pour créer une instance vide. |
Method Summary | |
void |
finalize()
Appelée sur une instance de PoolingFunction ou de WritingFunction avant la libération de celle-ci. |
void |
init(ChannelInfos infos)
Initialise le Channel pour l'utilisation de la fonction submit(java.lang.Object, submarine.core.RouteInfos, submarine.core.Message.MsgContext, submarine.core.ChannelInfos) . |
void |
run()
Boucle infinie de traitement des messages de EAISystem.waitingQueue la
file d'attente des messages asynchrones.
|
private org.w3c.dom.Document |
serializeObject(Serializer ser,
Message.MsgContext context,
java.lang.Object o)
Encapsulate a call to a Serializer to test whether the serializer need the context |
private java.lang.Object |
serializeXML(Serializer ser,
Message.MsgContext context,
org.w3c.dom.Document doc)
Encapsulate a call to a Serializer to test whether the serializer need the context |
java.lang.Object |
submit(java.lang.Object message,
RouteInfos infos,
Message.MsgContext context,
ChannelInfos ChannelInfos)
Implémente la transformation d'un message Object vers Object en passant par XML.
|
Methods inherited from class java.lang.Object |
|
Field Detail |
public java.lang.String name
private static final int S_INIT
private static final int S_PARSE
private static final int S_XSLTRANSFORM
private static final int S_SERIALIZE
private static final int S_WRITE
private static final int S_DONE
public int step
public static final java.lang.String[] stepMessages
private java.util.Vector xslMessages
public ChannelInfos infos
init(ChannelInfos)
.
Voué à disparaître au profit d'un getChannelInfos()private javax.xml.transform.Templates xslTemplate
private Serializer parser
init(ChannelInfos)
.private Serializer serializer
init(ChannelInfos)
.private WritingFunction writer
private EAISystem eai
Channel(EAISystem)
.Constructor Detail |
public Channel(EAISystem _eai)
init(ChannelInfos)
_eai
- Le EAISystem qui crée le ChannelMethod Detail |
private java.lang.Object serializeXML(Serializer ser, Message.MsgContext context, org.w3c.dom.Document doc) throws java.lang.Exception
private org.w3c.dom.Document serializeObject(Serializer ser, Message.MsgContext context, java.lang.Object o) throws java.lang.Exception
public java.lang.Object submit(java.lang.Object message, RouteInfos infos, Message.MsgContext context, ChannelInfos ChannelInfos)
Object
vers Object
en passant par XML.
L'algorithme utilisé suit les phase d'un Channel décrite en entêtemessage
- Le message d'entré soumis au Channel.infos
- Les informations de routages de ce message. Seul infos.sync est
utilisé actuellement dans cette fonction.context
- Le contexte de soumission du message. contient surtout le docId.
Pourraît contenir par la suite la transaction.WritingFunction.putSyncDocument(submarine.core.Message.MsgContext, java.lang.Object)
dans le cas d'une soumission synchrone.
Si une
exception est levée lors de ce traitement, elle est retournée ici et non pas
levée.public void run()
EAISystem.waitingQueue
la
file d'attente des messages asynchrones.
Si le thread est interrompu par Thread.interrupt(), la boucle infinie s'arrête.run
in interface java.lang.Runnable
public void init(ChannelInfos infos) throws java.lang.Exception
submit(java.lang.Object, submarine.core.RouteInfos, submarine.core.Message.MsgContext, submarine.core.ChannelInfos)
.infos
- Les informations de configuration d'un Channel.java.lang.Exception
- public void finalize()
Finalizable
finalize
in interface Finalizable
finalize
in class java.lang.Object
|
Submarine project. free distribution of this software must include the opensource licence. Guénolé de Cadoudal. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |