Ajout de la possibilité d'ajouter une command de retour pour un ProtocolReader
This commit is contained in:
parent
06fb0086fb
commit
6574918650
@ -71,7 +71,6 @@ public class MulticastServerListener implements Runnable {
|
||||
// Create the store processor
|
||||
StoreProcessor storeProcessor = new StoreProcessor(socket, readerResult.getDomain(), null); // TODO <!!!> : Voir comment on procède get via repo ou ici ?!
|
||||
// Add the store processor to its repository
|
||||
|
||||
this.repository.addStore(storeProcessor);
|
||||
} catch (IOException ignore) {
|
||||
ignore.printStackTrace();
|
||||
|
@ -12,7 +12,21 @@ public abstract class ProtocolReader {
|
||||
this.rulePattern = Pattern.compile(pattern);
|
||||
}
|
||||
|
||||
public abstract class ProtocolResult {}
|
||||
public abstract class ProtocolResult {
|
||||
|
||||
/**
|
||||
* Command qui sera renvoyée par exemple au client
|
||||
*/
|
||||
private String resultCommand;
|
||||
|
||||
public String getResultCommand() {
|
||||
return resultCommand;
|
||||
}
|
||||
|
||||
public void setResultCommand(String resultCommand) {
|
||||
this.resultCommand = resultCommand;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Permet de lancer la décomposition d'une commande pour en extraire les données
|
||||
|
@ -51,7 +51,6 @@ public class StoreProcessorRepository implements AutoCloseable, MulticastSPR {
|
||||
@Override
|
||||
public void addStore(StoreProcessor store) {
|
||||
this.handlers.add(store);
|
||||
System.out.println(handlers.size());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user