submarine.pages
Class PoolerPageInvoker

java.lang.Object
  |
  +--submarine.pages.PoolerPageInvoker
All Implemented Interfaces:
PoolingFunction, SubmiterAware, XMLConfigurable

public class PoolerPageInvoker
extends java.lang.Object
implements PoolingFunction, SubmiterAware


Field Summary
private  PoolingFunction pf
           
private  Submiter submiter
           
private  WSPCompilerLoader wrapper
           
protected  org.w3c.dom.Element xmlConfig
           
 
Constructor Summary
PoolerPageInvoker()
           
 
Method Summary
 long getFrequency()
          Fournit La durée pendant laquelle l'EAIsystem doit attendre avant de renouveller les appels.
 java.lang.Object getNextDocument()
          Retourne le document suivant de la liste initialisé lors de l'appel à hasNewDocument().
L'implémentation de cette méthode ne doit pas être bloquante.
 RouteInfos getRouteInfos()
          Fournit les informations de routage pour le dernier document lu par getNextDocument.
 boolean hasNewDocument()
          La PoolingFunction a-elle de nouveaux documents à soumettre au Systeme EAI ?
 void init(org.w3c.dom.Element xml)
           
 void notifyResponse(java.lang.Object doc, java.lang.Object response, boolean ok)
          Notifie la PoolingFunction que la soumission de l'objet doc a eu lieu et que la réponse est response.
 void setSubmiter(Submiter s)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

submiter

private Submiter submiter

xmlConfig

protected org.w3c.dom.Element xmlConfig

pf

private PoolingFunction pf

wrapper

private WSPCompilerLoader wrapper
Constructor Detail

PoolerPageInvoker

public PoolerPageInvoker()
Method Detail

init

public void init(org.w3c.dom.Element xml)
          throws java.lang.Exception
Specified by:
init in interface XMLConfigurable
Following copied from interface: submarine.core.XMLConfigurable
Parameters:
xml -  
Throws:
java.lang.Exception -  

setSubmiter

public void setSubmiter(Submiter s)
Specified by:
setSubmiter in interface SubmiterAware
Following copied from interface: submarine.core.SubmiterAware
Parameters:
s -  

hasNewDocument

public boolean hasNewDocument()
Description copied from interface: PoolingFunction
La PoolingFunction a-elle de nouveaux documents à soumettre au Systeme EAI ?
Appelée après chaque réveil de la PoolingFunction, l'implémentation de cette méthode doit permettre de vérifier auprès du tiers si des documents sont disponibles.
Specified by:
hasNewDocument in interface PoolingFunction
Following copied from interface: submarine.core.PoolingFunction
Returns:
boolean Retourne Vrai si et seulement si au moins un appel à getNextDocument() ne retournera pas null.

getNextDocument

public java.lang.Object getNextDocument()
                                 throws java.lang.Exception
Description copied from interface: PoolingFunction
Retourne le document suivant de la liste initialisé lors de l'appel à hasNewDocument().
L'implémentation de cette méthode ne doit pas être bloquante.
Specified by:
getNextDocument in interface PoolingFunction
Following copied from interface: submarine.core.PoolingFunction
Returns:
java.lang.Object Retourne le nouvel objet java représentant le message. Retourne null si le dernier message a déjà été lu.
Throws:
java.lang.Exception - Si une exception est levée lors de l'exécution de cette méthode, le processus d'interrogation s'interrompt.

getFrequency

public long getFrequency()
Description copied from interface: PoolingFunction
Fournit La durée pendant laquelle l'EAIsystem doit attendre avant de renouveller les appels.
Cette fréquence peut être fixe ou bien variable selon le besoin du connecteur.
Specified by:
getFrequency in interface PoolingFunction
Following copied from interface: submarine.core.PoolingFunction
Returns:
long La durée pendant laquelle l'EAISystem va attendre en millisecondes.

getRouteInfos

public RouteInfos getRouteInfos()
Description copied from interface: PoolingFunction
Fournit les informations de routage pour le dernier document lu par getNextDocument.
Ces informations peuvent être systématiquement identique, dans ce cas, la même instance de RouteInfos peut être utilisée. Si ces informations dépendent du message (routage en fonction du contenu), une instance spécifique devra être fournie.
Specified by:
getRouteInfos in interface PoolingFunction
Following copied from interface: submarine.core.PoolingFunction
Returns:
submarine.core.RouteInfos Les informations de routage.

notifyResponse

public void notifyResponse(java.lang.Object doc,
                           java.lang.Object response,
                           boolean ok)
Description copied from interface: PoolingFunction
Notifie la PoolingFunction que la soumission de l'objet doc a eu lieu et que la réponse est response.
Le paramètre ok, indique si une erreur s'est produite lors le la soumission du message.
Specified by:
notifyResponse in interface PoolingFunction
Following copied from interface: submarine.core.PoolingFunction
Parameters:
doc - L'objet Java ayant été retourné par le précedent appel à getNextDocument.
response - La réponse de la soumission du message au Systeme EAI. Voir EAISystem.submit(java.lang.Object, submarine.core.RouteInfos, submarine.core.Message.MsgContext).
ok - Vrai si la soumission s'est passée sans erreur, et faut si une exception s'est produite. Si la soumission était asynchrone, ok n'indique pas si le traitement du message s'est bien passé mais seulement qu'il a bien été inséré dans la file d'attente.

Submarine project. free distribution of this software must include the opensource licence.
Guénolé de Cadoudal.