/Users/detro/workspace-nb/JAEBI-BlueToothJ2MEClient/src/SelectXRequestProcessor.java

Vai alla documentazione di questo file.
00001 import java.util.Hashtable;
00002 import java.util.Vector;
00003 import org.jaebi.midlet.bt.btException.BtIOException;
00004 import org.jaebi.midlet.bt.requestProcessing.XRequestProcessor;
00005 import org.jaebi.midlet.bt.responseHandling.XResponseHandler;
00006 /*
00007  * SelectXRequestProcessor.java
00008  *
00009  * Created on 22 giugno 2005, 20.21
00010  *
00011  * To change this template, choose Tools | Options and locate the template under
00012  * the Source Creation and Management node. Right-click the template and choose
00013  * Open. You can then make changes to the template in the Source Editor.
00014  */
00015 
00020 public class SelectXRequestProcessor extends XRequestProcessor {
00021     
00022     private String whereNode = "";
00023     private String columnsNode = "";
00024     
00026     public SelectXRequestProcessor() {
00027     }
00028     
00029     public void setWhereClause(Hashtable whereConditions){
00030         
00031     }
00032     
00033     public void setSelectedColumns(Vector columns){
00034         
00035     }
00036  
00037     public void run(){
00038         String xRequest = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <xrequest xmlns=\"http://xml.netbeans.org/examples/targetNS\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://xml.netbeans.org/examples/targetNS xrequest.xsd\" type=\"select\">";
00039         String xresponse = "";
00040         String beginMarker = "<xresponse xmlns=\"http://xml.netbeans.org/examples/targetNS\">";
00041         String endMarker = "</xresponse>";
00042         xRequest += this.getTablenode();
00043         xRequest += this.columnsNode;
00044         xRequest += this.whereNode;
00045         xRequest += "</xrequest>";
00046         
00047         try{
00048             this.sendRequest(xRequest);
00049             //TODO debug
00050             System.out.println("SexlectXRequestProcessor::run -  ho mandato");
00051             xresponse = this.getResponseContent(beginMarker, endMarker);
00052         }
00053         catch(BtIOException e){
00054             
00055             /*
00056              * si è verificato un errore durante la comunicazione. Lo notifico
00057              * attraverso l'handler
00058              */
00059             ((XResponseHandler)this.handler).connectionError();
00060             return;
00061         }
00062         
00063         this.columnsNode = "";        
00064         this.whereNode = "";
00065         this.setTableName("");
00066         ((XResponseHandler)this.handler).handleMessageResponse(xresponse);
00067     }
00068     
00069 }

Generato il Thu Jun 23 00:03:00 2005 per JAEBI - BlueTooth J2ME Midlet Client da  doxygen 1.4.3