You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(125) |
Jul
(70) |
Aug
(169) |
Sep
(78) |
Oct
(37) |
Nov
(6) |
Dec
(11) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(56) |
Feb
(24) |
Mar
(150) |
Apr
(127) |
May
(33) |
Jun
(3) |
Jul
(54) |
Aug
(22) |
Sep
(20) |
Oct
(2) |
Nov
(1) |
Dec
(1) |
2017 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Updates f. o. SF C. r. a. p. h. <fip...@li...> - 2017-05-05 15:30:58
|
Hi, I just wanted to follow up with my previous email to check whether you have received it If you would be interested in acquiring our b2b email lists, please let us know your target client's criteria (Job titles/Industry sectors/Geography) you would like to reach We will certainly get back to you with numbers of contacts we maintain, samples, and guarantees on the list with more information Thank you and look forward to hear your positive response Regards, Lisa Garner From: Lisa Garner [mailto:lis...@sa...] Sent: Monday, April 24, 2017 10:54 AM To: 'fip...@li...' Subject: Machine tool industry contacts info Hi, Hope you doing well! Would you be interested in acquiring complete contact details including valid & verified email addresses of Machine tool industry professionals for your upcoming marketing promotions. Database consists of:- Name, Web site, Contact Name, Title, Verified & Opt-in Email Address, Mailing Address, Telephone Number, Fax Number, Industry, Sic Code, Revenue, Number of Employees etc. Data sources:- Tradeshows, Business directories, online magazine subscription, yellow pages etc. List Format:- Excel Sheet Our Services:- E mail Lists, E mail Appending, Custom List Building, and Campaign Job titles/categories:- . Business Owners/Company Management . President/Corporate Executives/General Manager . Executive Management (CEO, CFO, President, VP) . Executive - Technical (CTO, CIO, Chief Scientist) . Engineering Management & Department . Manufacturing Management & Department . Production Management & Department . Operation Management & Department . R&D Director/Manager . Manufacturing Engineers and Managers . Machinist/Process Engineer . Machine Tool Industry Sales Professionals . Marketing/Sales Management & Department . Purchasing Management & Department . Industrial Equipment Buyers . Manufacturing Buyers . Metalworking Buyers . Vendors/Builders/Distributors . Analyst/Venture/Finance/Investors/Entrepreneurs Please let me know your specific target criteria you would be interested in reaching below:- . Job titles _________________ . Vertical industries _________________ . Countries/states/counties ________________ We maintain numerous B2B database of all industries and titles. Let me know your thoughts. So that I can send you few samples to check our database accuracy along with counts and pricing. Once you own the list, it can be used multiple times and can target the list for Multi-Channel Marketing Solutions like E-Mail Campaigns, Direct Marketing, Telemarketing, Fax Marketing, etc. Looking forward to hear from you Regards, Lisa Garner | Marketing Executive Lead Generation Team (USA/Canada/UK/Europe/Australia) _____ To remove from this mailing: reply with subject line as "leave out." |
From: Updates f. o. SF C. r. a. p. h. <fip...@li...> - 2017-04-24 14:54:56
|
Hi, Hope you doing well! Would you be interested in acquiring complete contact details including valid & verified email addresses of Machine tool industry professionals for your upcoming marketing promotions. Database consists of:- Name, Web site, Contact Name, Title, Verified & Opt-in Email Address, Mailing Address, Telephone Number, Fax Number, Industry, Sic Code, Revenue, Number of Employees etc. Data sources:- Tradeshows, Business directories, online magazine subscription, yellow pages etc. List Format:- Excel Sheet Our Services:- E mail Lists, E mail Appending, Custom List Building, and Campaign Job titles/categories:- . Business Owners/Company Management . President/Corporate Executives/General Manager . Executive Management (CEO, CFO, President, VP) . Executive - Technical (CTO, CIO, Chief Scientist) . Engineering Management & Department . Manufacturing Management & Department . Production Management & Department . Operation Management & Department . R&D Director/Manager . Manufacturing Engineers and Managers . Machinist/Process Engineer . Machine Tool Industry Sales Professionals . Marketing/Sales Management & Department . Purchasing Management & Department . Industrial Equipment Buyers . Manufacturing Buyers . Metalworking Buyers . Vendors/Builders/Distributors . Analyst/Venture/Finance/Investors/Entrepreneurs Please let me know your specific target criteria you would be interested in reaching below:- . Job titles _________________ . Vertical industries _________________ . Countries/states/counties ________________ We maintain numerous B2B database of all industries and titles. Let me know your thoughts. So that I can send you few samples to check our database accuracy along with counts and pricing. Once you own the list, it can be used multiple times and can target the list for Multi-Channel Marketing Solutions like E-Mail Campaigns, Direct Marketing, Telemarketing, Fax Marketing, etc. Looking forward to hear from you Regards, Lisa Garner | Marketing Executive Lead Generation Team (USA/Canada/UK/Europe/Australia) _____ To remove from this mailing: reply with subject line as "leave out." |
From: <fip...@li...> - 2002-12-04 13:41:57
|
Update of /cvsroot/fipa-os/fipaos/src/fipaos/mts/http/internal In directory sc8-pr-cvs1:/tmp/cvs-serv7434 Modified Files: Tag: PATTERNS HTTPComms.java Log Message: made protected constructor public Index: HTTPComms.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/mts/http/internal/HTTPComms.java,v retrieving revision 1.10 retrieving revision 1.10.2.1 diff -C2 -r1.10 -r1.10.2.1 *** HTTPComms.java 2 Jul 2002 18:00:50 -0000 1.10 --- HTTPComms.java 4 Dec 2002 13:41:52 -0000 1.10.2.1 *************** *** 81,85 **** * @throws InitialisationException if the MTP fails to initialise */ ! protected HTTPComms(String name, fipaos.util.URL ns, int port, String fixed_address) throws InitialisationException { super(name, ns, port, fixed_address); --- 81,85 ---- * @throws InitialisationException if the MTP fails to initialise */ ! public HTTPComms(String name, fipaos.util.URL ns, int port, String fixed_address) throws InitialisationException { super(name, ns, port, fixed_address); |
From: <fip...@li...> - 2002-11-11 12:03:04
|
Update of /cvsroot/fipa-os/fipaos/src/fipaos/mts/http/internal In directory usw-pr-cvs1:/tmp/cvs-serv31574 Modified Files: HTTPInboxTest.java Log Message: Modified to remove dependency on netbeans testsuite. Index: HTTPInboxTest.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/mts/http/internal/HTTPInboxTest.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** HTTPInboxTest.java 3 Sep 2002 10:06:55 -0000 1.5 --- HTTPInboxTest.java 11 Nov 2002 12:02:59 -0000 1.6 *************** *** 50,54 **** import java.io.*; import java.util.*; ! import org.netbeans.junit.*; /** --- 50,54 ---- import java.io.*; import java.util.*; ! //import org.netbeans.junit.*; /** |
From: <fip...@li...> - 2002-10-30 13:18:03
|
Update of /cvsroot/fipa-os/fipaos/src/fipaos/util In directory usw-pr-cvs1:/tmp/cvs-serv16328 Modified Files: TimedConnection.java Log Message: Added diagnostics. Index: TimedConnection.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/util/TimedConnection.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** TimedConnection.java 29 May 2002 09:15:01 -0000 1.2 --- TimedConnection.java 30 Oct 2002 13:17:58 -0000 1.3 *************** *** 60,66 **** } catch (InterruptedException ie) ! {} } timer += poll_time; if (timer > timeout) //timeout has expired { --- 60,69 ---- } catch (InterruptedException ie) ! { ! DIAGNOSTICS.println("Sleep was interrupted", ie, this, DIAGNOSTICS.LEVEL_MIN); ! } } timer += poll_time; + DIAGNOSTICS.println("checking " + timer + " > " + timeout, this, DIAGNOSTICS.LEVEL_MIN); if (timer > timeout) //timeout has expired { *************** *** 92,95 **** --- 95,99 ---- catch (IOException ioe) { + DIAGNOSTICS.println("Couln't connect", ioe, this, DIAGNOSTICS.LEVEL_MIN); } } |
From: <fip...@li...> - 2002-10-25 17:34:49
|
Update of /cvsroot/fipa-os/fipaos/src/fipaos/util In directory usw-pr-cvs1:/tmp/cvs-serv10553 Modified Files: UTCDuration.java Log Message: Added equals() method that actually works. Index: UTCDuration.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/util/UTCDuration.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** UTCDuration.java 13 Aug 2002 16:47:59 -0000 1.10 --- UTCDuration.java 25 Oct 2002 10:40:54 -0000 1.11 *************** *** 280,283 **** --- 280,297 ---- } + public boolean equals( Object other ) + { + boolean result = false; + + if( other instanceof UTCDuration ) + { + UTCDuration duration = (UTCDuration) other; + + result = duration.getDurationInMillis() == getDurationInMillis(); + } + + return result; + } + //---------------------------------------------------------------------- // PRIVATE METHODS |
From: <fip...@li...> - 2002-09-11 09:36:47
|
Update of /cvsroot/fipa-os/fipaos/src/fipaos/mts/http/internal In directory usw-pr-cvs1:/tmp/cvs-serv21097 Modified Files: HTTPComms.java HTTPCommsMTSTest.java Log Message: Added lease support from earlier branch. Not working properly yet. Index: HTTPComms.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/mts/http/internal/HTTPComms.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** HTTPComms.java 3 Sep 2002 10:06:55 -0000 1.17 --- HTTPComms.java 11 Sep 2002 09:36:44 -0000 1.18 *************** *** 55,58 **** --- 55,59 ---- private HTTPListener _listener; + private String _my_address; /** *************** *** 72,75 **** --- 73,87 ---- /** + * Thread that renews lease with naming service + */ + private Thread _lease_renewer; + + + /** + * Indicates if _lease_renewer should shutdown + */ + private boolean _lease_renewer_shutdown = false; + + /** * Creates a new instance of HTTPComms. Calls super. * *************** *** 151,173 **** try { ! URL bind = new URL("http://" + _ns_url.getHost() + ":" + _ns_url.getPort() + "/?" + HTTPAgentNamingServiceImpl.BIND + "=" + _name + "&" + HTTPAgentNamingServiceImpl.URL + "=" + _my_address); ! DIAGNOSTICS.println("Bind URL is " + bind,this,DIAGNOSTICS.LEVEL_2); ! HttpURLConnection connection = (HttpURLConnection) bind.openConnection(); ! ! //time out connection if it's not happening ! try ! { ! new TimedConnection(connection); ! } ! catch (ConnectException ce) ! { ! ! } ! ! if ( connection.getResponseCode() != HttpURLConnection.HTTP_OK ) ! { ! throw new InitialisationException("Couldn't bind to the naming service"); ! } ! connection.disconnect(); } catch( Throwable t ) --- 163,168 ---- try { ! startServer(); ! doBind(); } catch( Throwable t ) *************** *** 175,180 **** --- 170,231 ---- throw new InitialisationException("Couldn't bind to the naming service: " + t); } + + // Startup lease-renewing thread? + if( _lease_renewer == null ) + { + _lease_renewer_shutdown = false; + _lease_renewer = new Thread( new Runnable() + { + public void run() + { + while( !_lease_renewer_shutdown ) + { + try + { + // Sleep for a while + Thread.sleep( ( HTTPAgentNamingServiceImpl.LEASE_TIMEOUT * 2 ) / 3 ); + + // Renew lease + doBind(); + } + catch( InterruptedException e ) + { + } + catch( Throwable e ) + { + } + } + } + } ); + } } + + /** + * Actually send the bind request + */ + private void doBind() throws IOException, InitialisationException + { + URL bind = new URL("http://" + _ns_url.getHost() + ":" + _ns_url.getPort() + "/?" + HTTPAgentNamingServiceImpl.BIND + "=" + _name + "&" + HTTPAgentNamingServiceImpl.URL + "=" + _my_address); + DIAGNOSTICS.println("Bind URL is " + bind,this,DIAGNOSTICS.LEVEL_2); + HttpURLConnection connection = (HttpURLConnection) bind.openConnection(); + + //time out connection if it's not happening + try + { + new TimedConnection(connection); + } + catch (ConnectException ce) + { + } + + if ( connection.getResponseCode() != HttpURLConnection.HTTP_OK ) + { + throw new InitialisationException("Couldn't bind to the naming service"); + } + connection.disconnect(); + } + + /** * Retreives the protocols known by this comms implementation *************** *** 252,260 **** * Un-bind the MTP to the NS (if it exists) */ ! protected void unbind() { try { ! //unbind the agent URL bind = new URL("http://" + _ns_url.getHost() + ":" + _ns_url.getPort() + "/?" + HTTPAgentNamingServiceImpl.UNBIND + "=" + _name); HttpURLConnection connection = (HttpURLConnection) bind.openConnection(); --- 303,328 ---- * Un-bind the MTP to the NS (if it exists) */ ! protected synchronized void unbind() { try { ! // Stop lease thread ! _lease_renewer_shutdown = true; ! ! // Wait for the thread to terminate ! _lease_renewer.interrupt(); ! try ! { ! _lease_renewer.join(); ! } ! catch( InterruptedException e ) ! { ! } ! ! // Remove reference to lease renewer ! _lease_renewer = null; ! ! ! // Unbind URL bind = new URL("http://" + _ns_url.getHost() + ":" + _ns_url.getPort() + "/?" + HTTPAgentNamingServiceImpl.UNBIND + "=" + _name); HttpURLConnection connection = (HttpURLConnection) bind.openConnection(); *************** *** 266,272 **** } catch (ConnectException ce) ! { } ! if ( connection.getResponseCode() != HttpURLConnection.HTTP_OK ) { DIAGNOSTICS.println("Couldn't unbind from the naming service: " + connection.getHeaderField(0), this, DIAGNOSTICS.LEVEL_MAX); --- 334,341 ---- } catch (ConnectException ce) ! { ! } ! if (( connection.getHeaderField(0) == null) || (connection.getResponseCode() != HttpURLConnection.HTTP_OK )) { DIAGNOSTICS.println("Couldn't unbind from the naming service: " + connection.getHeaderField(0), this, DIAGNOSTICS.LEVEL_MAX); *************** *** 276,280 **** catch( Throwable t ) { ! DIAGNOSTICS.println("Couldn't unbind from the naming service: " + t, this, DIAGNOSTICS.LEVEL_MAX); } } --- 345,349 ---- catch( Throwable t ) { ! DIAGNOSTICS.println("Couldn't unbind from the naming service: ",t , this, DIAGNOSTICS.LEVEL_MAX); } } *************** *** 405,416 **** { ServerSocket server = new ServerSocket(_port); ! if ( _my_address == null) ! { ! _my_address = "fipaos-http://" + server.getInetAddress().getLocalHost().getHostAddress() + ":" + server.getLocalPort(); ! } ! else ! { ! _my_address = "fipaos-http://" + _my_address + ":" + _port; ! } _listener = new HTTPListener(server); _listener.start(); --- 474,478 ---- { ServerSocket server = new ServerSocket(_port); ! _my_address = "fipaos-http://" + server.getInetAddress().getLocalHost().getHostAddress() + ":" + server.getLocalPort(); _listener = new HTTPListener(server); _listener.start(); Index: HTTPCommsMTSTest.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/mts/http/internal/HTTPCommsMTSTest.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** HTTPCommsMTSTest.java 3 Sep 2002 10:06:55 -0000 1.5 --- HTTPCommsMTSTest.java 11 Sep 2002 09:36:44 -0000 1.6 *************** *** 182,185 **** --- 182,187 ---- assertTrue("Content wasn't what was sent", _message_receiver._content.get(_sender).equals(_receiver)); + + _receiver_mts.shutdown(); } *************** *** 226,229 **** --- 228,233 ---- assertTrue("Content wasn't what was sent", _message_receiver._content.get(_sender).equals(_receiver)); + _receiver_mts.shutdown(); + ns2.stop(); } *************** *** 236,240 **** { _sender_mts.shutdown(); - _receiver_mts.shutdown(); _ns.stop(); DIAGNOSTICS.flush(); --- 240,243 ---- |
From: <fip...@li...> - 2002-09-06 09:57:47
|
Update of /cvsroot/fipa-os/fipaos/src/fipaos/mts/http/internal/ns In directory usw-pr-cvs1:/tmp/cvs-serv22704 Modified Files: HTTPAgentNamingServiceImpl.java Log Message: Integrated lease functionality. Fixed a startup bug with removing database files. Index: HTTPAgentNamingServiceImpl.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/mts/http/internal/ns/HTTPAgentNamingServiceImpl.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** HTTPAgentNamingServiceImpl.java 2 Sep 2002 14:27:17 -0000 1.9 --- HTTPAgentNamingServiceImpl.java 6 Sep 2002 09:57:42 -0000 1.10 *************** *** 51,55 **** * 5 minutes */ ! public final static long LEASE_TIMEOUT = Long.parseLong( System.getProperty( "fipaos.http.ns.lease-time", "300000" ) ); /** Socket the NS listens to incoming connections. --- 51,55 ---- * 5 minutes */ ! public final static long LEASE_TIMEOUT = Long.parseLong( System.getProperty( "fipaos.http.ns.lease-time", "30000" ) ); /** Socket the NS listens to incoming connections. *************** *** 143,157 **** } ! // start listening to connections while ( !_stop ) { ! // DIAGNOSTICS.println( "Dispatch loop count", this, DIAGNOSTICS.LEVEL_3 ); ! try { Socket socket = _server.accept(); DIAGNOSTICS.println("New connection", this, DIAGNOSTICS.LEVEL_3); ! dispatch( socket ); } --- 143,157 ---- } ! // start listening to connections while ( !_stop ) { ! // DIAGNOSTICS.println( "Dispatch loop count", this, DIAGNOSTICS.LEVEL_3 ); ! try { Socket socket = _server.accept(); DIAGNOSTICS.println("New connection", this, DIAGNOSTICS.LEVEL_3); ! dispatch( socket ); } *************** *** 160,164 **** // Thrown in the case that an SO_TIMEOUT occurs - we *should* just // be able to ignore this ! // DIAGNOSTICS.println( e, DIAGNOSTICS.LEVEL_MAX ); } } --- 160,164 ---- // Thrown in the case that an SO_TIMEOUT occurs - we *should* just // be able to ignore this ! // DIAGNOSTICS.println( e, DIAGNOSTICS.LEVEL_MAX ); } } *************** *** 171,175 **** catch( IOException e ) { ! DIAGNOSTICS.println( "Couldn't close the server socket", e, this, DIAGNOSTICS.LEVEL_MAX ); } --- 171,175 ---- catch( IOException e ) { ! DIAGNOSTICS.println( "Couldn't close the server socket", e, this, DIAGNOSTICS.LEVEL_MAX ); } *************** *** 206,210 **** // Indicate to the server that it should check the NS shutdown status ! // _server_thread.interrupt(); try --- 206,210 ---- // Indicate to the server that it should check the NS shutdown status ! // _server_thread.interrupt(); try *************** *** 259,263 **** String next = null; ! //"ping" all the agents to see whether they'return alive DIAGNOSTICS.println( "Starting purging of references", this, DIAGNOSTICS.LEVEL_3 ); --- 259,263 ---- String next = null; ! //"ping" all the agents to see whether they're alive DIAGNOSTICS.println( "Starting purging of references", this, DIAGNOSTICS.LEVEL_3 ); *************** *** 277,344 **** DIAGNOSTICS.println("Examining: " + next, this, DIAGNOSTICS.LEVEL_MIN); - // Attempt to ping (throws an exception if something goes wrong) - _references.startTransaction(true); - NSReference ref = (NSReference) _references.findObject(next); - _references.endTransaction(); - - URL ping = new URL("http://" + ref._url.getHost() + ":" + ref._url.getPort()); - DIAGNOSTICS.println("URL to ping: " + ping, this, DIAGNOSTICS.LEVEL_MIN); - HttpURLConnection connection = (HttpURLConnection) ping.openConnection(); - connection.setRequestMethod("HEAD"); - //time out connection if it's not happening try { ! new TimedConnection(connection); ! } ! catch (ConnectException ce) ! { ! } ! ! DIAGNOSTICS.println("Reply first header line is " + connection.getHeaderField(0), this, DIAGNOSTICS.LEVEL_MIN); ! if ((connection.getHeaderField(0) == null) || (connection.getResponseCode() != HttpURLConnection.HTTP_OK)) ! { ! //agent is not alive, so remove it try { ! _references.startTransaction(false); ! _references.removeObject(next); ! _references.endTransaction(); } ! catch (DatabaseException de) { - DIAGNOSTICS.println("Couln't remove " + next + " from database", this, DIAGNOSTICS.LEVEL_MAX); } - catch (Throwable t) - { - DIAGNOSTICS.println("Couln't remove " + next + " from database: " + t, this, DIAGNOSTICS.LEVEL_MAX); - } - DIAGNOSTICS.println(next + " is no longer alive, removing...", this, DIAGNOSTICS.LEVEL_MAX); - DIAGNOSTICS.println("Has more elements? " + enum.hasMoreElements(), this, DIAGNOSTICS.LEVEL_MIN); - } - else - { - DIAGNOSTICS.println(next + " is alive, keeping the reference & reseting lease...", this, DIAGNOSTICS.LEVEL_MAX); ! try { ! // Reset lease ! ref.resetLease(); ! ! // Update DB ! _references.startTransaction(true); ! _references.updateObject( ref ); ! _references.endTransaction(); ! } ! catch (DatabaseException de) ! { ! DIAGNOSTICS.println("Couln't update " + next, this, DIAGNOSTICS.LEVEL_MAX); } ! catch (Throwable t) { ! DIAGNOSTICS.println("Couln't update " + next, t, this, DIAGNOSTICS.LEVEL_MAX); } - DIAGNOSTICS.println(next + " is no longer alive, removing...", this, DIAGNOSTICS.LEVEL_MAX); - DIAGNOSTICS.println("Has more elements? " + enum.hasMoreElements(), this, DIAGNOSTICS.LEVEL_MIN); } } } --- 277,350 ---- DIAGNOSTICS.println("Examining: " + next, this, DIAGNOSTICS.LEVEL_MIN); try { ! // Attempt to ping ! _references.startTransaction(false); ! NSReference ref = (NSReference) _references.findObject(next); ! _references.endTransaction(); ! ! URL ping = new URL("http://" + ref._url.getHost() + ":" + ref._url.getPort()); ! DIAGNOSTICS.println("URL to ping: " + ping, this, DIAGNOSTICS.LEVEL_MIN); ! HttpURLConnection connection = (HttpURLConnection) ping.openConnection(); ! connection.setRequestMethod("HEAD"); ! //time out connection if it's not happening try { ! new TimedConnection(connection); } ! catch (ConnectException ce) { } ! DIAGNOSTICS.println("Reply first header line is " + connection.getHeaderField(0), this, DIAGNOSTICS.LEVEL_MIN); ! if ((connection.getHeaderField(0) == null) || (connection.getResponseCode() != HttpURLConnection.HTTP_OK)) { ! //agent is not alive, so remove it ! try ! { ! _references.startTransaction(false); ! _references.removeObject(next); ! _references.endTransaction(); ! } ! catch (DatabaseException de) ! { ! DIAGNOSTICS.println("Couln't remove " + next + " from database", this, DIAGNOSTICS.LEVEL_MAX); ! } ! catch (Throwable t) ! { ! DIAGNOSTICS.println("Couln't remove " + next + " from database: " + t, this, DIAGNOSTICS.LEVEL_MAX); ! } ! DIAGNOSTICS.println(next + " is no longer alive, removing...", this, DIAGNOSTICS.LEVEL_MAX); ! DIAGNOSTICS.println("Has more elements? " + enum.hasMoreElements(), this, DIAGNOSTICS.LEVEL_MIN); } ! else { ! DIAGNOSTICS.println(next + " is alive, keeping the reference & reseting lease...", this, DIAGNOSTICS.LEVEL_MAX); ! ! try ! { ! // Reset lease ! ref.resetLease(); ! ! // Update DB ! _references.startTransaction(false); ! _references.updateObject( ref ); ! _references.endTransaction(); ! } ! catch (DatabaseException de) ! { ! DIAGNOSTICS.println("Couln't update " + next, this, DIAGNOSTICS.LEVEL_MAX); ! } ! catch (Throwable t) ! { ! DIAGNOSTICS.println("Couln't update " + next, t, this, DIAGNOSTICS.LEVEL_MAX); ! } } } + catch (Throwable t) + { + DIAGNOSTICS.println("Couldn't remove " + next + ", maybe file has already been deleted?", this, DIAGNOSTICS.LEVEL_MAX); + } + } } *************** *** 459,463 **** catch (DatabaseException de) { ! DIAGNOSTICS.println("Error with the database, could not unbind: " + de, this, DIAGNOSTICS.LEVEL_MAX); resp.setError(500,"database error " + de); } --- 465,469 ---- catch (DatabaseException de) { ! DIAGNOSTICS.println("Error with the database, could not unbind: ", de, this, DIAGNOSTICS.LEVEL_MAX); resp.setError(500,"database error " + de); } *************** *** 470,474 **** catch (DatabaseException de) { ! DIAGNOSTICS.println("Error with the database, could not end transaction: " + de, this, DIAGNOSTICS.LEVEL_MAX); } } --- 476,480 ---- catch (DatabaseException de) { ! DIAGNOSTICS.println("Error with the database, could not end transaction: ", de, this, DIAGNOSTICS.LEVEL_MAX); } } |
From: <fip...@li...> - 2002-09-04 13:26:43
|
Update of /cvsroot/fipa-os/fipaos/src/fipaos/util In directory usw-pr-cvs1:/tmp/cvs-serv2798 Modified Files: HTTPJob.java Log Message: updated to remove the space which was preventing the HTTP from being correctly interpreted Index: HTTPJob.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/util/HTTPJob.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** HTTPJob.java 2 Sep 2002 14:26:12 -0000 1.3 --- HTTPJob.java 4 Sep 2002 13:26:38 -0000 1.4 *************** *** 277,281 **** dos.writeBytes( HTTP_VERSION ); ! dos.writeBytes(" "); dos.writeBytes( Integer.toString( response.getStatusCode() ) ); --- 277,281 ---- dos.writeBytes( HTTP_VERSION ); ! //dos.writeBytes(" "); dos.writeBytes( Integer.toString( response.getStatusCode() ) ); |
From: <fip...@li...> - 2002-09-03 17:26:52
|
Update of /cvsroot/fipa-os/fipaos/src/fipaos/skill/db/serializationdatabase In directory usw-pr-cvs1:/tmp/cvs-serv6195/db/serializationdatabase Modified Files: SerializationDatabase.java Log Message: Added more information on the exception message that is thrown when deletion of a file is unsuccessful. Index: SerializationDatabase.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/skill/db/serializationdatabase/SerializationDatabase.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** SerializationDatabase.java 12 Mar 2001 10:21:40 -0000 1.10 --- SerializationDatabase.java 3 Sep 2002 17:26:46 -0000 1.11 *************** *** 622,626 **** if( !file.delete() ) { ! throw new DatabaseException("Error removing file " + file.getPath() + " !" ); } } --- 622,626 ---- if( !file.delete() ) { ! throw new DatabaseException( "Error removing file " + file.getPath() + "! " + (file.exists()?"File exists though.":"File doesn't exist.") ); } } |
From: <fip...@li...> - 2002-09-03 12:41:15
|
Update of /cvsroot/fipa-os/fipaos/src/fipaos/mts/http/internal In directory usw-pr-cvs1:/tmp/cvs-serv25965 Modified Files: HTTPResponse.java Log Message: updated to return redirect code. Index: HTTPResponse.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/mts/http/internal/HTTPResponse.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** HTTPResponse.java 2 Sep 2002 16:18:37 -0000 1.4 --- HTTPResponse.java 3 Sep 2002 12:41:11 -0000 1.5 *************** *** 134,138 **** // Add redirect stuff setHeader( LOCATION, url ); ! _status_code = 200; _reason_phrase = "Moved Temporarily"; --- 134,138 ---- // Add redirect stuff setHeader( LOCATION, url ); ! _status_code = TEMP_REDIRECT; _reason_phrase = "Moved Temporarily"; |
From: <fip...@li...> - 2002-09-03 10:07:05
|
Update of /cvsroot/fipa-os/fipaos/src/fipaos/test/mts/http/internal In directory usw-pr-cvs1:/tmp/cvs-serv8888/test/mts/http/internal Modified Files: HTTPCommsTest.java Log Message: Changes to make the HTTP Comms test suite run. Index: HTTPCommsTest.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/test/mts/http/internal/HTTPCommsTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** HTTPCommsTest.java 29 May 2002 17:02:55 -0000 1.1 --- HTTPCommsTest.java 3 Sep 2002 10:06:55 -0000 1.2 *************** *** 43,47 **** fipaos.mts.http.internal.HTTPCommsMTPTest.suite(), fipaos.mts.http.internal.HTTPCommsMTSTest.suite(), ! fipaos.test.mts.http.internal.ns.HTTPAgentNamingServiceImplTest.suite() }; --- 43,48 ---- fipaos.mts.http.internal.HTTPCommsMTPTest.suite(), fipaos.mts.http.internal.HTTPCommsMTSTest.suite(), ! fipaos.test.mts.http.internal.ns.HTTPAgentNamingServiceImplTest.suite(), ! fipaos.mts.http.internal.HTTPInboxTest.suite() }; |
Update of /cvsroot/fipa-os/fipaos/src/fipaos/mts/http/internal In directory usw-pr-cvs1:/tmp/cvs-serv8888/mts/http/internal Modified Files: HTTPInboxTest.java HTTPCommsMTSTest.java HTTPCommsMTPTest.java HTTPComms.java Log Message: Changes to make the HTTP Comms test suite run. Index: HTTPInboxTest.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/mts/http/internal/HTTPInboxTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** HTTPInboxTest.java 2 Sep 2002 13:16:27 -0000 1.4 --- HTTPInboxTest.java 3 Sep 2002 10:06:55 -0000 1.5 *************** *** 318,322 **** public void testSendMessage_NtoN() throws Throwable { ! int number_of_messages = 10; HTTPComms[] senders = new HTTPComms[number_of_messages]; IncomingReceiver[] sender_receivers = new IncomingReceiver[number_of_messages*10]; --- 318,322 ---- public void testSendMessage_NtoN() throws Throwable { ! int number_of_messages = 5; HTTPComms[] senders = new HTTPComms[number_of_messages]; IncomingReceiver[] sender_receivers = new IncomingReceiver[number_of_messages*10]; Index: HTTPCommsMTSTest.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/mts/http/internal/HTTPCommsMTSTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** HTTPCommsMTSTest.java 26 Jul 2002 14:08:35 -0000 1.4 --- HTTPCommsMTSTest.java 3 Sep 2002 10:06:55 -0000 1.5 *************** *** 123,126 **** --- 123,127 ---- public void setUp() { + DIAGNOSTICS.setMemoryLevel(DIAGNOSTICS.LEVEL_3); DIAGNOSTICS.setFileLevel(DIAGNOSTICS.LEVEL_MIN); //start up the naming service *************** *** 144,148 **** data.setValue( NS_NAME ); service.addServiceData(data); ! service.setName("sender@testap"); _services.addService(service); --- 145,149 ---- data.setValue( NS_NAME ); service.addServiceData(data); ! service.setName("fipaos-http"); _services.addService(service); *************** *** 155,159 **** * Send message between two MTS' on the same platform. */ ! public void testSendIntraplatformMessage() { _receiver = new AgentID(); --- 156,160 ---- * Send message between two MTS' on the same platform. */ ! public void testSendIntraplatformMessage() throws Exception { _receiver = new AgentID(); *************** *** 177,180 **** --- 178,182 ---- while (!_message_receiver._message_received) { + Thread.sleep(1000); } *************** *** 186,200 **** * Send message between two MTS' on different platforms. */ ! public void testSendInterplatformMessage() { ! HTTPAgentNamingServiceImpl ns2 = null; ! try ! { ! ns2 = new HTTPAgentNamingServiceImpl(PORT+1); ! } ! catch (IOException ioe) ! { ! fail("Couldn't start up the naming service: " + ioe); ! } fipaos.agent.profile.StackServices services = new fipaos.agent.profile.StackServicesImpl(); --- 188,194 ---- * Send message between two MTS' on different platforms. */ ! public void testSendInterplatformMessage() throws Exception { ! HTTPAgentNamingServiceImpl ns2 = new HTTPAgentNamingServiceImpl(PORT+1); fipaos.agent.profile.StackServices services = new fipaos.agent.profile.StackServicesImpl(); *************** *** 204,208 **** data.setValue( NS_NAME2 ); service.addServiceData(data); ! service.setName("sender@testap"); services.addService(service); --- 198,202 ---- data.setValue( NS_NAME2 ); service.addServiceData(data); ! service.setName("fipaos-http"); services.addService(service); *************** *** 227,230 **** --- 221,225 ---- while (!_message_receiver._message_received) { + Thread.sleep(1000); } *************** *** 283,284 **** --- 278,280 ---- } + Index: HTTPCommsMTPTest.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/mts/http/internal/HTTPCommsMTPTest.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** HTTPCommsMTPTest.java 2 Sep 2002 13:16:28 -0000 1.7 --- HTTPCommsMTPTest.java 3 Sep 2002 10:06:55 -0000 1.8 *************** *** 319,513 **** /** - * One sender, multiple receivers with a static port. - * - * @throws Exception if something goes wrong - */ - public void testFixedSendMessage_1toN() throws Exception - { - Hashtable mtps = new Hashtable(); - Hashtable mtps2 = new Hashtable(); - int port = 50000; - String address = InetAddress.getLocalHost().getHostAddress(); - - _sender = new AgentID(); - _sender.setName("sender@testap"); - - fipaos.agent.profile.MTPService service = new fipaos.agent.profile.MTPServiceImpl(); - fipaos.agent.profile.ServiceData data = new fipaos.agent.profile.ServiceDataImpl(); - data.setKey( "ns" ); - data.setValue( NS_NAME ); - service.addServiceData(data); - service.setName("sender@testap"); - - try - { - _sender_mtp = new HTTPComms(service, port++, address); - } - catch (InitialisationException ie) - { - fail("Couldn't start up the MTP: " + ie); - } - - for (int i=0; i<100; i++) - { - HTTPComms receiver_mtp = null; - AgentID receiver_aid = null; - String receiver = "receiver" + i + "@testap"; - - receiver_aid = new AgentID(); - receiver_aid.setName(receiver); - - ACL acl = new ACL(); - acl.setSenderAID(_sender); - acl.setReceiverAID(receiver_aid); - acl.setPerformative("inform-ref"); - Map hash = new Hashtable(); - hash.put(_sender, receiver_aid); - acl.setContentObject(hash); - - Message message = new Message(acl); - - service = new fipaos.agent.profile.MTPServiceImpl(); - data = new fipaos.agent.profile.ServiceDataImpl(); - data.setKey( "ns" ); - data.setValue( NS_NAME ); - service.addServiceData(data); - service.setName(receiver); - try - { - receiver_mtp = new HTTPComms(service, port++, address); - } - catch (InitialisationException ie) - { - fail("Couldn't start up the MTP: " + ie); - } - - IncomingReceiver receiver_incoming = new HTTPCommsMTPTest.IncomingReceiver(); - receiver_mtp.initialise(receiver_incoming, null); - - mtps.put(receiver_aid, message); - mtps2.put(receiver_mtp, receiver_incoming); - } - - //send messages - Iterator i = mtps.keySet().iterator(); - while (i.hasNext()) - { - AgentID next = (AgentID) i.next(); - String just_name = next.getName().substring(0,next.getName().indexOf("@")); - _sender_mtp.send(_sender_mtp.lookup(new fipaos.util.URL(NS_NAME + just_name)), (Message) mtps.get(next)); - } - - //wait - Thread.sleep(5000); - - //check messages - i = mtps2.keySet().iterator(); - while (i.hasNext()) - { - IncomingReceiver rec = (IncomingReceiver) mtps2.get((HTTPComms) i.next()); - if (!rec._message_received) - { - fail("Not all messages where received"); - } - } - - //shutdown - _sender_mtp.shutdown(); - i = mtps2.keySet().iterator(); - while (i.hasNext()) - { - ((HTTPComms) i.next()).shutdown(); - } - } - - /** - * Multiple senders, one receiver with a static port. - * - * @throws Exception if something goes wrong - */ - public void testFixedSendMessage_Nto1() throws Exception - { - int port = 50000; - String address = InetAddress.getLocalHost().getHostAddress(); - Hashtable mtps = new Hashtable(); - - fipaos.agent.profile.MTPService service = new fipaos.agent.profile.MTPServiceImpl(); - fipaos.agent.profile.ServiceData data = new fipaos.agent.profile.ServiceDataImpl(); - data.setKey( "ns" ); - data.setValue( NS_NAME ); - service.addServiceData(data); - service.setName("receiver@testap"); - - try - { - _receiver_mtp = new HTTPComms(service, port++, address); - } - catch (InitialisationException ie) - { - fail("Couldn't start up the MTP: " + ie); - } - _receiver_incoming = new HTTPCommsMTPTest.IncomingReceiver(); - _receiver_mtp.initialise(_receiver_incoming, null); - - for (int i=0; i<100; i++) - { - HTTPComms sender_mtp = null; - AgentID sender_aid = null; - String sender = "sender" + i + "@testap"; - - service = new fipaos.agent.profile.MTPServiceImpl(); - data = new fipaos.agent.profile.ServiceDataImpl(); - data.setKey( "ns" ); - data.setValue( NS_NAME ); - service.addServiceData(data); - service.setName(sender); - - try - { - sender_mtp = new HTTPComms(service, port++, address); - } - catch (InitialisationException ie) - { - fail("Couldn't start up the MTP: " + ie); - } - sender_aid = new AgentID(); - sender_aid.setName(sender); - - ACL acl = new ACL(); - acl.setSenderAID(sender_aid); - acl.setReceiverAID(_receiver); - Map hash = new Hashtable(); - hash.put(sender_aid, _receiver); - acl.setContentObject(hash); - - Message message = new Message(acl); - - mtps.put(sender_mtp, message); - } - //send messages - Iterator i = mtps.keySet().iterator(); - while (i.hasNext()) - { - HTTPComms comms = (HTTPComms) i.next(); - comms.send(comms.lookup(new fipaos.util.URL(NS_NAME + "receiver")), (Message) mtps.get(comms)); - } - - while (_receiver_incoming._message_count <100) - { - } - - assertEquals("Not all messages where received", 100, _receiver_incoming._message_count); - - //shutdown - _receiver_mtp.shutdown(); - i = mtps.keySet().iterator(); - while (i.hasNext()) - { - ((HTTPComms) i.next()).shutdown(); - } - } - - /** * Checks that the agent will respond to a ping if it's alive when NS restarts. * --- 319,322 ---- Index: HTTPComms.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/mts/http/internal/HTTPComms.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** HTTPComms.java 30 Aug 2002 17:13:14 -0000 1.16 --- HTTPComms.java 3 Sep 2002 10:06:55 -0000 1.17 *************** *** 93,111 **** /** - * Creates a new instance of HTTPComms. Calls super. - * - * @param name name of the agent - * @param ns address of the naming service - * @param port port this MTP should run on - * @throws InitialisationException if the MTP fails to initialise - */ - protected HTTPComms(MTPService service, int port, String fixed_address) throws InitialisationException - { - super(service, port, fixed_address); - - DIAGNOSTICS.println("Starting HTTP comms in port " + port + " with a fixed address " + fixed_address,this,DIAGNOSTICS.LEVEL_3); - } - - /** * Bind the MTP to the NS and starts up the server that listens to incoming connections. * --- 93,96 ---- |
From: <fip...@li...> - 2002-09-03 10:07:05
|
Update of /cvsroot/fipa-os/fipaos/src/fipaos/mts In directory usw-pr-cvs1:/tmp/cvs-serv8888/mts Modified Files: MTS.java MTPBase.java InternalMTPBase.java Log Message: Changes to make the HTTP Comms test suite run. Index: MTS.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/mts/MTS.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** MTS.java 26 Jul 2002 14:08:34 -0000 1.18 --- MTS.java 3 Sep 2002 10:06:54 -0000 1.19 *************** *** 337,344 **** if( _mr != null ) { ! fipaos.mts.service.MTSServiceComm service_comm = (fipaos.mts.service.MTSServiceComm)msg.getMessageContent(); ! if( service_comm != null ) { ! DIAGNOSTICS.println( "Received Service Comm message, passing to MessageReceiver: " + service_comm.toString(), this, DIAGNOSTICS.LEVEL_3 ); receiveMessage( msg ); } --- 337,345 ---- if( _mr != null ) { ! //fipaos.mts.service.MTSServiceComm service_comm = (fipaos.mts.service.MTSServiceComm)msg.getMessageContent(); ! MessageContent content = msg.getMessageContent(); ! if(( content != null ) && (content instanceof fipaos.mts.service.MTSServiceComm)) { ! DIAGNOSTICS.println( "Received Service Comm message, passing to MessageReceiver: " + content.toString(), this, DIAGNOSTICS.LEVEL_3 ); receiveMessage( msg ); } Index: MTPBase.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/mts/MTPBase.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** MTPBase.java 13 Aug 2002 14:46:38 -0000 1.18 --- MTPBase.java 3 Sep 2002 10:06:54 -0000 1.19 *************** *** 127,137 **** } - protected MTPBase(MTPService service, int port, String fixed_address) throws InitialisationException - { - _port = port; - _my_address = fixed_address; - init(service, null); - } - //---------------------------------------------------------------------- // PUBLIC METHODS --- 127,130 ---- Index: InternalMTPBase.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/mts/InternalMTPBase.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** InternalMTPBase.java 13 Aug 2002 14:46:38 -0000 1.12 --- InternalMTPBase.java 3 Sep 2002 10:06:54 -0000 1.13 *************** *** 82,90 **** } ! protected InternalMTPBase(MTPService service, int port, String fixed_address) throws InitialisationException ! { ! super( service, port, fixed_address ); ! } ! //---------------------------------------------------------------------- // PUBLIC METHODS - InternalMTP implementation --- 82,86 ---- } ! //---------------------------------------------------------------------- // PUBLIC METHODS - InternalMTP implementation |
From: <fip...@li...> - 2002-09-03 10:07:05
|
Update of /cvsroot/fipa-os/fipaos/src/fipaos/test/mts/http/internal/ns In directory usw-pr-cvs1:/tmp/cvs-serv8888/test/mts/http/internal/ns Modified Files: HTTPAgentNamingServiceImplTest.java Log Message: Changes to make the HTTP Comms test suite run. Index: HTTPAgentNamingServiceImplTest.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/test/mts/http/internal/ns/HTTPAgentNamingServiceImplTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** HTTPAgentNamingServiceImplTest.java 23 May 2002 15:47:49 -0000 1.2 --- HTTPAgentNamingServiceImplTest.java 3 Sep 2002 10:06:55 -0000 1.3 *************** *** 238,241 **** --- 238,248 ---- { _ns.stop(); + try + { + Thread.sleep(3000); + } + catch (InterruptedException ie) + { + } } |
From: <fip...@li...> - 2002-09-02 16:18:40
|
Update of /cvsroot/fipa-os/fipaos/src/fipaos/mts/http/internal In directory usw-pr-cvs1:/tmp/cvs-serv21958/mts/http/internal Modified Files: HTTPResponse.java Log Message: ready for tagging as INTERNAL_HTTPv0_0_4 Index: HTTPResponse.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/mts/http/internal/HTTPResponse.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** HTTPResponse.java 2 Sep 2002 14:25:10 -0000 1.3 --- HTTPResponse.java 2 Sep 2002 16:18:37 -0000 1.4 *************** *** 134,138 **** // Add redirect stuff setHeader( LOCATION, url ); ! _status_code = TEMP_REDIRECT; _reason_phrase = "Moved Temporarily"; --- 134,138 ---- // Add redirect stuff setHeader( LOCATION, url ); ! _status_code = 200; _reason_phrase = "Moved Temporarily"; |
From: <fip...@li...> - 2002-09-02 15:46:32
|
Update of /cvsroot/fipa-os/fipaos/src/fipaos/mts/http/internal/inbox In directory usw-pr-cvs1:/tmp/cvs-serv10518 Added Files: HTTPInboxComm.java Log Message: Fixed the branch problem. |
From: <fip...@li...> - 2002-09-02 15:18:57
|
Update of /cvsroot/fipa-os/fipaos/build/subset/fipaos-util In directory usw-pr-cvs1:/tmp/cvs-serv32407 Modified Files: build.ant.properties Log Message: Explictly excludes HTTPJob now (dependancies in other packages!) Index: build.ant.properties =================================================================== RCS file: /cvsroot/fipa-os/fipaos/build/subset/fipaos-util/build.ant.properties,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** build.ant.properties 25 Jul 2002 14:34:20 -0000 1.3 --- build.ant.properties 2 Sep 2002 15:18:53 -0000 1.4 *************** *** 14,18 **** source.include=fipaos/FIPAOSException.java,fipaos/util/*.java,fipaos/util/objecteditor/**/*.java ! source.exclude=**/XMLDataBinding.java,**/StringParser.java,**/FlagHandler.java javadoc.packagenames=fipaos.util,fipaos.util.objecteditor --- 14,18 ---- source.include=fipaos/FIPAOSException.java,fipaos/util/*.java,fipaos/util/objecteditor/**/*.java ! source.exclude=**/XMLDataBinding.java,**/StringParser.java,**/FlagHandler.java,**/HTTPJob.java javadoc.packagenames=fipaos.util,fipaos.util.objecteditor |
From: <fip...@li...> - 2002-09-02 14:27:22
|
Update of /cvsroot/fipa-os/fipaos/src/fipaos/mts/http/internal/ns In directory usw-pr-cvs1:/tmp/cvs-serv12629/fipaos/mts/http/internal/ns Modified Files: HTTPAgentNamingServiceImpl.java Log Message: Modified to use independent thread for the server, and hence shutdown synchronously Index: HTTPAgentNamingServiceImpl.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/mts/http/internal/ns/HTTPAgentNamingServiceImpl.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** HTTPAgentNamingServiceImpl.java 16 Aug 2002 15:00:21 -0000 1.8 --- HTTPAgentNamingServiceImpl.java 2 Sep 2002 14:27:17 -0000 1.9 *************** *** 54,64 **** /** Socket the NS listens to incoming connections. ! */ private ServerSocket _server = null; /** True if the naming service has been shut down. ! */ private boolean _stop = false; /** * Database to hold Agent references */ --- 54,75 ---- /** Socket the NS listens to incoming connections. ! */ private ServerSocket _server = null; + /** True if the naming service has been shut down. ! */ private boolean _stop = false; /** + * Synchronized lock for _stop + */ + private Object _stop_lock = new Object(); + + /** + * Thread for the server + */ + private Thread _server_thread; + + /** * Database to hold Agent references */ *************** *** 66,80 **** /** Constant for bind message. ! */ public static final String BIND = "bind"; /** Constant for unbind message. ! */ public static final String UNBIND = "unbind"; /** Constant for lookup message. ! */ public static final String LOOKUP = "lookup"; /** Constant for URL in the bind message. ! */ public static final String URL = "url"; --- 77,91 ---- /** Constant for bind message. ! */ public static final String BIND = "bind"; /** Constant for unbind message. ! */ public static final String UNBIND = "unbind"; /** Constant for lookup message. ! */ public static final String LOOKUP = "lookup"; /** Constant for URL in the bind message. ! */ public static final String URL = "url"; *************** *** 85,90 **** * * @param port port the NS is going to run on ! * @throws IOException if something goes wrong ! */ public HTTPAgentNamingServiceImpl(int port) throws IOException { --- 96,101 ---- * * @param port port the NS is going to run on ! * @throws IOException if something goes wrong ! */ public HTTPAgentNamingServiceImpl(int port) throws IOException { *************** *** 115,135 **** DIAGNOSTICS.println("Naming service has been started up at port " + port, this, DIAGNOSTICS.LEVEL_3); ! ThreadPool.getGlobalThreadPool().addJob( new ThreadPool.Job() { ! public void go() { // start listening to connections while ( !_stop ) { try { Socket socket = _server.accept(); ! DIAGNOSTICS.println("New connection", this, DIAGNOSTICS.LEVEL_2); ! dispatch( socket ); } catch( IOException e ) { ! DIAGNOSTICS.println( e, DIAGNOSTICS.LEVEL_MAX ); } } --- 126,164 ---- DIAGNOSTICS.println("Naming service has been started up at port " + port, this, DIAGNOSTICS.LEVEL_3); ! // ThreadPool.getGlobalThreadPool().addJob( new ThreadPool.Job() ! // { ! // public void go() ! _server_thread = new Thread( new Runnable() { ! public void run() { + try + { + // Ensure that _socket.accept() doesn't block forever + _server.setSoTimeout( 500 ); + } + catch( SocketException se ) + { + DIAGNOSTICS.println( "SocketException caught when trying to set Server timeout", se, this, DIAGNOSTICS.LEVEL_4 ); + } + + // start listening to connections while ( !_stop ) { + // DIAGNOSTICS.println( "Dispatch loop count", this, DIAGNOSTICS.LEVEL_3 ); + try { Socket socket = _server.accept(); ! DIAGNOSTICS.println("New connection", this, DIAGNOSTICS.LEVEL_3); ! dispatch( socket ); } catch( IOException e ) { ! // Thrown in the case that an SO_TIMEOUT occurs - we *should* just ! // be able to ignore this ! // DIAGNOSTICS.println( e, DIAGNOSTICS.LEVEL_MAX ); } } *************** *** 138,156 **** try { _references.closeDatabase(); } catch (DatabaseException de) { ! DIAGNOSTICS.println("Couldn't close the database", this, DIAGNOSTICS.LEVEL_MAX); } ! DIAGNOSTICS.println("Naming service shut down", this, DIAGNOSTICS.LEVEL_MAX); } }); } /** * Stops the naming service by closing the socket. ! */ public void stop() { --- 167,195 ---- try { + _server.close(); + } + catch( IOException e ) + { + DIAGNOSTICS.println( "Couldn't close the server socket", e, this, DIAGNOSTICS.LEVEL_MAX ); + } + + try + { _references.closeDatabase(); } catch (DatabaseException de) { ! DIAGNOSTICS.println( "Couldn't close the database", de, this, DIAGNOSTICS.LEVEL_MAX ); } ! DIAGNOSTICS.println( "Naming service shut down", this, DIAGNOSTICS.LEVEL_MAX ); } }); + _server_thread.start(); } /** * Stops the naming service by closing the socket. ! */ public void stop() { *************** *** 161,165 **** _server.close(); } ! catch( IOException e ) { } --- 200,217 ---- _server.close(); } ! catch( IOException ioe ) ! { ! //do nothing ! } ! ! // Indicate to the server that it should check the NS shutdown status ! // _server_thread.interrupt(); ! ! try ! { ! // Wait for Server thread to terminate ! _server_thread.join(); ! } ! catch( InterruptedException e ) { } *************** *** 174,186 **** { _references.startTransaction( false ); ! Enumeration keys = _references.getIDs(); while( keys.hasMoreElements() ) { String key_next = (String) keys.nextElement(); ! _references.removeObject( key_next ); } ! _references.endTransaction(); } --- 226,238 ---- { _references.startTransaction( false ); ! Enumeration keys = _references.getIDs(); while( keys.hasMoreElements() ) { String key_next = (String) keys.nextElement(); ! _references.removeObject( key_next ); } ! _references.endTransaction(); } *************** *** 191,195 **** * * @param socket socket connection for this job ! */ private void dispatch( Socket socket ) { --- 243,247 ---- * * @param socket socket connection for this job ! */ private void dispatch( Socket socket ) { *************** *** 202,206 **** * Checks whether the agents in the current database are still alive by sending * them a "ping" message (HTTP HEAD message). ! */ private void checkReferences() { --- 254,258 ---- * Checks whether the agents in the current database are still alive by sending * them a "ping" message (HTTP HEAD message). ! */ private void checkReferences() { *************** *** 240,244 **** } catch (ConnectException ce) ! { } --- 292,296 ---- } catch (ConnectException ce) ! { } *************** *** 301,309 **** } ! /** * Starts up the naming service in a specified port. * * @param args first (and only) argument contains the port number ! */ public static void main(java.lang.String[] args) { --- 353,361 ---- } ! /** * Starts up the naming service in a specified port. * * @param args first (and only) argument contains the port number ! */ public static void main(java.lang.String[] args) { *************** *** 318,322 **** /** * This inner class deals with incoming HTTP messages. ! */ private class NsHttpJob extends fipaos.util.HTTPJob { --- 370,374 ---- /** * This inner class deals with incoming HTTP messages. ! */ private class NsHttpJob extends fipaos.util.HTTPJob { *************** *** 326,330 **** * * @param socket incoming socket ! */ public NsHttpJob(Socket socket) { --- 378,382 ---- * * @param socket incoming socket ! */ public NsHttpJob(Socket socket) { *************** *** 466,483 **** } } ! /** * This inner class is the container which the NS entries are stored in. ! */ private static class NSReference implements DatabaseObject { /** URL of the agent. ! */ public fipaos.util.URL _url = null; /** Name of the agent. ! */ public String _name = null; --- 518,535 ---- } } ! /** * This inner class is the container which the NS entries are stored in. ! */ private static class NSReference implements DatabaseObject { /** URL of the agent. ! */ public fipaos.util.URL _url = null; /** Name of the agent. ! */ public String _name = null; *************** *** 492,496 **** * @param name name of the agent * @param url URL of the agent ! */ public NSReference(String name, fipaos.util.URL url) { --- 544,548 ---- * @param name name of the agent * @param url URL of the agent ! */ public NSReference(String name, fipaos.util.URL url) { *************** *** 504,508 **** * * @return name of the agent ! */ public String getObjectID() { --- 556,560 ---- * * @return name of the agent ! */ public String getObjectID() { |
From: <fip...@li...> - 2002-09-02 14:26:16
|
Update of /cvsroot/fipa-os/fipaos/src/fipaos/util In directory usw-pr-cvs1:/tmp/cvs-serv12208/fipaos/util Modified Files: HTTPJob.java Log Message: refactored to work with the latest data model and write the response appropriately Index: HTTPJob.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/util/HTTPJob.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** HTTPJob.java 22 May 2002 17:14:04 -0000 1.2 --- HTTPJob.java 2 Sep 2002 14:26:12 -0000 1.3 *************** *** 46,56 **** protected static final String CRLF = "\r\n"; ! protected static final String HTTP_HEADER = "HTTP/1.0 "; ! ! protected static final String CONTENT_TYPE = "Content-Type: "; protected static final String OK = "200 OK"; ! protected static final String LOCATION = "Location: "; public HTTPJob(Socket socket) --- 46,54 ---- protected static final String CRLF = "\r\n"; ! protected static final String HTTP_VERSION = "HTTP/1.0 "; protected static final String OK = "200 OK"; ! public HTTPJob(Socket socket) *************** *** 277,310 **** // Send back the response ! dos.writeBytes( HTTP_HEADER ); ! ! // Check if we're dealing with an abnormal return code ! if( response.getErrorCondition() != -1 ) ! { ! dos.writeBytes( "" + response.getErrorCondition() ); ! dos.writeBytes( " " ); ! dos.writeBytes( response.getErrorMessage() ); ! dos.writeBytes( CRLF ); ! ! // If we're dealing with a redirect, add the location header ! if( response.getErrorCondition() == HTTPResponse.TEMP_REDIRECT ) ! { ! dos.writeBytes( LOCATION ); ! dos.writeBytes( response.getLocation() ); ! dos.writeBytes( CRLF ); ! } ! } ! else ! { ! // Send back OK code + message ! dos.writeBytes( OK ); ! dos.writeBytes( CRLF ); ! } dos.writeBytes( CONTENT_LENGTH ); dos.writeBytes( "" + response.getContent().length ); - dos.writeBytes( CRLF ); - dos.writeBytes( CONTENT_TYPE ); - dos.writeBytes( response.getContentType() ); dos.writeBytes( CRLF ); dos.writeBytes( CRLF ); --- 275,308 ---- // Send back the response ! dos.writeBytes( HTTP_VERSION ); ! ! dos.writeBytes(" "); ! ! dos.writeBytes( Integer.toString( response.getStatusCode() ) ); ! ! dos.writeBytes(" "); ! ! dos.writeBytes( response.getReasonPhrase() ); ! ! dos.writeBytes(CRLF); ! ! Map headers = response.getHeaders(); ! ! java.util.Iterator header_keys = headers.keySet().iterator(); ! ! while( header_keys.hasNext() ) ! { ! String current_header = (String)header_keys.next(); ! ! dos.writeBytes( current_header+": " ); ! ! String current_value = (String)headers.get( current_header ); ! ! dos.writeBytes( current_value ); ! dos.writeBytes( CRLF ); ! } dos.writeBytes( CONTENT_LENGTH ); dos.writeBytes( "" + response.getContent().length ); dos.writeBytes( CRLF ); dos.writeBytes( CRLF ); |
From: <fip...@li...> - 2002-09-02 14:25:14
|
Update of /cvsroot/fipa-os/fipaos/src/fipaos/mts/http/internal In directory usw-pr-cvs1:/tmp/cvs-serv11818/fipaos/mts/http/internal Modified Files: HTTPResponse.java Log Message: refactored to accomodate more flexible data model Index: HTTPResponse.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/mts/http/internal/HTTPResponse.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** HTTPResponse.java 13 Jun 2002 13:11:35 -0000 1.2 --- HTTPResponse.java 2 Sep 2002 14:25:10 -0000 1.3 *************** *** 32,35 **** --- 32,36 ---- import java.util.TreeMap; import java.io.*; + import java.util.HashMap; /** *************** *** 50,75 **** */ public final static int PERMISSION_DENIED = 403; ! /** Default constant type. ! */ ! private String _content_type = "text/plain"; ! /** Error message indicator. */ ! private int _error_condition = -1; ! /** Error message. */ ! private String _error_message; /** Byte-encoded content of the message. */ private byte[] _content; /** Used to read the content. */ private ByteArrayOutputStream _baos; ! /** Used write the content. */ private PrintWriter _pw; ! /** Redirect new location. ! */ ! private String _location; /** --- 51,105 ---- */ public final static int PERMISSION_DENIED = 403; + + public final static String LOCATION = "Location"; + + protected static final String CONTENT_LENGTH = "Content-Length"; ! protected static final String CRLF = "\r\n"; ! ! protected static final String HTTP_HEADER = "HTTP/1.0 "; ! ! protected static final String CONTENT_TYPE = "Content-Type"; ! ! protected static final String OK = "OK"; ! ! /** Error message indicator. */ ! private int _status_code; ! ! /** Error message. */ ! private String _reason_phrase; /** Byte-encoded content of the message. */ private byte[] _content; + /** Used to read the content. */ private ByteArrayOutputStream _baos; ! ! /** Used write the content. */ private PrintWriter _pw; ! ! /** ! */ ! private Map _headers; ! ! ! ! /** ! *Constructor which will initialise all headers, and variables with default. ! */ ! public HTTPResponse() ! { ! _headers = new HashMap(); ! ! _headers.put( CONTENT_TYPE, "text/plain" ); ! ! _status_code = 200; ! ! _reason_phrase = OK; ! } /** *************** *** 81,87 **** public void setError( int code, String message ) { ! _error_condition = code; ! _error_message = message; } /** --- 111,127 ---- public void setError( int code, String message ) { ! _status_code = code; ! _reason_phrase = message; } + + public void setStatusCode( int status_code ) + { + _status_code = status_code; + } + + public void setReasonPhrase( String reason_phrase ) + { + _reason_phrase = reason_phrase; + } /** *************** *** 93,106 **** { // Add redirect stuff ! _error_condition = TEMP_REDIRECT; ! _error_message = "Moved Temporarily"; ! _location = url; // Add some content - _content_type = "text/html"; PrintWriter pw = getPrintWriter(); pw.println( "<html><body>Redirect to:<a href=\"" + url + "\">" + url + "</a></body></html>" ); } /** --- 133,167 ---- { // Add redirect stuff ! setHeader( LOCATION, url ); ! _status_code = TEMP_REDIRECT; ! _reason_phrase = "Moved Temporarily"; // Add some content PrintWriter pw = getPrintWriter(); pw.println( "<html><body>Redirect to:<a href=\"" + url + "\">" + url + "</a></body></html>" ); } + + /** + * Set the header of the returned HTTP message + * @param + */ + public void setHeader( String key, String value ) + { + if( key != null && value != null ) + { + _headers.put( key, value ); + } + }//end setHeader + + public Map getHeaders() + { + return _headers; + } + + public String getHeader( String key ) + { + return (String)_headers.get( key ); + } /** *************** *** 111,115 **** public String getLocation() { ! return _location; } --- 172,176 ---- public String getLocation() { ! return getHeader( LOCATION ); } *************** *** 121,125 **** public int getErrorCondition() { ! return _error_condition; } --- 182,191 ---- public int getErrorCondition() { ! return _status_code; ! } ! ! public int getStatusCode() ! { ! return _status_code; } *************** *** 131,135 **** public String getErrorMessage() { ! return _error_message; } --- 197,211 ---- public String getErrorMessage() { ! return _reason_phrase; ! } ! ! /** ! * Get the error message (if any) of the response ! * ! * @return The error message, or null if there is no error ! */ ! public String getReasonPhrase() ! { ! return _reason_phrase; } *************** *** 141,145 **** public void setContentType( String content_type ) { ! _content_type = content_type; } --- 217,221 ---- public void setContentType( String content_type ) { ! _headers.put( CONTENT_TYPE, content_type ); } *************** *** 151,155 **** public String getContentType() { ! return _content_type; } --- 227,231 ---- public String getContentType() { ! return (String)_headers.get( CONTENT_TYPE ); } *************** *** 238,249 **** { StringBuffer buff = new StringBuffer(); ! buff.append( "[" ); buff.append( "errorcode=" ); ! buff.append( _error_condition ); buff.append( ",errormessage=" ); ! buff.append( _error_message ); ! buff.append( ",contenttype=" ); ! buff.append( _content_type ); buff.append( ",contentlength=" ); if( _content != null ) { --- 314,339 ---- { StringBuffer buff = new StringBuffer(); ! buff.append( "[" ); ! ! //iterate through the ! java.util.Iterator header_keys = _headers.keySet().iterator(); ! ! while( header_keys.hasNext() ) ! { ! String current_header = (String)header_keys.next(); ! ! buff.append( current_header+"=" ); ! ! String current_value = (String)_headers.get( current_header ); ! ! buff.append( current_value +"," ); ! } ! buff.append( "errorcode=" ); ! buff.append( _status_code ); buff.append( ",errormessage=" ); ! buff.append( _reason_phrase ); buff.append( ",contentlength=" ); + if( _content != null ) { |
From: <fip...@li...> - 2002-09-02 13:16:32
|
Update of /cvsroot/fipa-os/fipaos/src/fipaos/mts/iiop/sun/external In directory usw-pr-cvs1:/tmp/cvs-serv20474/mts/iiop/sun/external Modified Files: SUNIIOPComms.java Log Message: Compiles with new transport hierarchy. Index: SUNIIOPComms.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/mts/iiop/sun/external/SUNIIOPComms.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** SUNIIOPComms.java 26 Jul 2002 14:08:35 -0000 1.17 --- SUNIIOPComms.java 2 Sep 2002 13:16:27 -0000 1.18 *************** *** 130,136 **** * @param ns_url URL for the transport */ ! public SUNIIOPComms( MTPService service ) throws InitialisationException { ! super( service ); } --- 130,136 ---- * @param ns_url URL for the transport */ ! public SUNIIOPComms( MTPService service, String our_name ) throws InitialisationException { ! super( service, our_name ); } |
From: <fip...@li...> - 2002-09-02 13:16:31
|
Update of /cvsroot/fipa-os/fipaos/src/fipaos/mts In directory usw-pr-cvs1:/tmp/cvs-serv20474/mts Modified Files: ExternalMTPBase.java Log Message: Compiles with new transport hierarchy. Index: ExternalMTPBase.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/mts/ExternalMTPBase.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** ExternalMTPBase.java 26 Jul 2002 14:08:34 -0000 1.9 --- ExternalMTPBase.java 2 Sep 2002 13:16:28 -0000 1.10 *************** *** 76,82 **** * then invokes bind() */ ! protected ExternalMTPBase( fipaos.agent.profile.MTPService service ) throws InitialisationException { ! super( service ); } --- 76,82 ---- * then invokes bind() */ ! protected ExternalMTPBase( fipaos.agent.profile.MTPService service, String name ) throws InitialisationException { ! super( service, name ); } *************** *** 219,223 **** public TestExternalMTPBase( String name, fipaos.agent.profile.MTPService service ) throws InitialisationException { ! super( service ); } --- 219,223 ---- public TestExternalMTPBase( String name, fipaos.agent.profile.MTPService service ) throws InitialisationException { ! super( service, name ); } |
From: <fip...@li...> - 2002-09-02 13:16:31
|
Update of /cvsroot/fipa-os/fipaos/src/fipaos/mts/rmi/internal In directory usw-pr-cvs1:/tmp/cvs-serv20474/mts/rmi/internal Modified Files: SSLRMIComms.java RMIComms.java Log Message: Compiles with new transport hierarchy. Index: SSLRMIComms.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/mts/rmi/internal/SSLRMIComms.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** SSLRMIComms.java 26 Jul 2002 14:08:36 -0000 1.8 --- SSLRMIComms.java 2 Sep 2002 13:16:27 -0000 1.9 *************** *** 59,65 **** private static final String TRANSPORT_PROTOCOL = "fipaos-ssl-rmi"; ! public SSLRMIComms( MTPService service ) throws InitialisationException, RemoteException { ! super( service ); } --- 59,65 ---- private static final String TRANSPORT_PROTOCOL = "fipaos-ssl-rmi"; ! public SSLRMIComms( MTPService service, String name ) throws InitialisationException, RemoteException { ! super( service, name ); } Index: RMIComms.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/mts/rmi/internal/RMIComms.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** RMIComms.java 26 Jul 2002 14:08:36 -0000 1.15 --- RMIComms.java 2 Sep 2002 13:16:27 -0000 1.16 *************** *** 100,107 **** * naming service - should include HAP address, i.e. "agentA@hap" */ ! public RMIComms( MTPService service ) throws InitialisationException, RemoteException { // Invoke super class constructor ! super( service ); Iterator i = service.getServiceDatas().iterator(); --- 100,107 ---- * naming service - should include HAP address, i.e. "agentA@hap" */ ! public RMIComms( MTPService service, String our_name ) throws InitialisationException, RemoteException { // Invoke super class constructor ! super( service, our_name ); Iterator i = service.getServiceDatas().iterator(); |
From: <fip...@li...> - 2002-09-02 13:16:31
|
Update of /cvsroot/fipa-os/fipaos/src/fipaos/test/agent In directory usw-pr-cvs1:/tmp/cvs-serv20474/test/agent Modified Files: TestingMTP.java Log Message: Compiles with new transport hierarchy. Index: TestingMTP.java =================================================================== RCS file: /cvsroot/fipa-os/fipaos/src/fipaos/test/agent/TestingMTP.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** TestingMTP.java 26 Jul 2002 14:08:38 -0000 1.6 --- TestingMTP.java 2 Sep 2002 13:16:27 -0000 1.7 *************** *** 83,89 **** private static Queue __incoming = new FIFOQueue(); ! public TestingMTP( MTPService service ) throws Exception { ! super(service); _agent_name = service.getName(); Iterator i = service.getServiceDatas().iterator(); --- 83,89 ---- private static Queue __incoming = new FIFOQueue(); ! public TestingMTP( MTPService service, String name ) throws Exception { ! super(service, name); _agent_name = service.getName(); Iterator i = service.getServiceDatas().iterator(); |