|
From: <pe...@us...> - 2003-09-24 23:56:57
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders
In directory sc8-pr-cvs1:/tmp/cvs-serv524/src/java/org/neuclear/senders
Modified Files:
LogSender.java Sender.java SmtpSender.java SoapSender.java
Log Message:
Refactoring nearly done. New model for creating signed objects.
With view for supporting the xmlpull api shortly for performance reasons.
Currently still uses dom4j but that has been refactored out that it
should now be very quick to implement a xmlpull implementation.
A side benefit of this is that the API has been further simplified. I still have some work
todo with regards to cleaning up some of the outlying parts of the code.
Index: LogSender.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders/LogSender.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** LogSender.java 23 Sep 2003 19:16:28 -0000 1.3
--- LogSender.java 24 Sep 2003 23:56:48 -0000 1.4
***************
*** 1,5 ****
package org.neuclear.senders;
! import org.neuclear.id.NamedObject;
import org.neuclear.id.NamedObjectFactory;
import org.neuclear.time.TimeTools;
--- 1,5 ----
package org.neuclear.senders;
! import org.neuclear.id.SignedNamedObject;
import org.neuclear.id.NamedObjectFactory;
import org.neuclear.time.TimeTools;
***************
*** 23,26 ****
--- 23,35 ----
* $Id$
* $Log$
+ * Revision 1.4 2003/09/24 23:56:48 pelle
+ * Refactoring nearly done. New model for creating signed objects.
+ * With view for supporting the xmlpull api shortly for performance reasons.
+ * Currently still uses dom4j but that has been refactored out that it
+ * should now be very quick to implement a xmlpull implementation.
+ *
+ * A side benefit of this is that the API has been further simplified. I still have some work
+ * todo with regards to cleaning up some of the outlying parts of the code.
+ *
* Revision 1.3 2003/09/23 19:16:28 pelle
* Changed NameSpace to Identity.
***************
*** 46,50 ****
* Revision 1.1 2003/02/14 21:10:34 pelle
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
! * The NamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
--- 55,59 ----
* Revision 1.1 2003/02/14 21:10:34 pelle
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
! * The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
***************
*** 52,56 ****
*/
public class LogSender extends Sender {
! public void send(String endpoint, NamedObject obj) throws NeudistException {
try {
String digest = URLEncoder.encode(Base64.encode(obj.getDigest()), "UTF-8");
--- 61,65 ----
*/
public class LogSender extends Sender {
! public void send(String endpoint, SignedNamedObject obj) throws NeudistException {
try {
String digest = URLEncoder.encode(Base64.encode(obj.getDigest()), "UTF-8");
***************
*** 107,111 ****
}
! public static Timestamp getTimeStamp(NamedObject obj) throws NeudistException {
return getTimeStamp(Utility.denullString(obj.getParent().getLogger(), LOGGER), obj.getDigest());
--- 116,120 ----
}
! public static Timestamp getTimeStamp(SignedNamedObject obj) throws NeudistException {
return getTimeStamp(Utility.denullString(obj.getParent().getLogger(), LOGGER), obj.getDigest());
***************
*** 114,118 ****
private static void logObject(String name) throws NeudistException {
System.out.print("Fetching...");
! NamedObject obj = NamedObjectFactory.fetchNamedObject(name);
System.out.println("Got " + obj.getName());
Sender log = new LogSender();
--- 123,127 ----
private static void logObject(String name) throws NeudistException {
System.out.print("Fetching...");
! SignedNamedObject obj = NamedObjectFactory.fetchNamedObject(name);
System.out.println("Got " + obj.getName());
Sender log = new LogSender();
Index: Sender.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders/Sender.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Sender.java 22 Sep 2003 19:24:02 -0000 1.1
--- Sender.java 24 Sep 2003 23:56:48 -0000 1.2
***************
*** 1,5 ****
package org.neuclear.senders;
! import org.neuclear.id.NamedObject;
import org.neudist.utils.NeudistException;
--- 1,5 ----
package org.neuclear.senders;
! import org.neuclear.id.SignedNamedObject;
import org.neudist.utils.NeudistException;
***************
*** 31,37 ****
*/
public abstract class Sender {
! public abstract void send(String endpoint, NamedObject obj) throws NeudistException;
! public static void quickSend(String receiver, NamedObject obj) {
}
}
--- 31,37 ----
*/
public abstract class Sender {
! public abstract void send(String endpoint, SignedNamedObject obj) throws NeudistException;
! public static void quickSend(String receiver, SignedNamedObject obj) {
}
}
Index: SmtpSender.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders/SmtpSender.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** SmtpSender.java 23 Sep 2003 19:16:28 -0000 1.3
--- SmtpSender.java 24 Sep 2003 23:56:48 -0000 1.4
***************
*** 8,11 ****
--- 8,20 ----
* $Id$
* $Log$
+ * Revision 1.4 2003/09/24 23:56:48 pelle
+ * Refactoring nearly done. New model for creating signed objects.
+ * With view for supporting the xmlpull api shortly for performance reasons.
+ * Currently still uses dom4j but that has been refactored out that it
+ * should now be very quick to implement a xmlpull implementation.
+ *
+ * A side benefit of this is that the API has been further simplified. I still have some work
+ * todo with regards to cleaning up some of the outlying parts of the code.
+ *
* Revision 1.3 2003/09/23 19:16:28 pelle
* Changed NameSpace to Identity.
***************
*** 27,31 ****
* Revision 1.1 2003/02/14 21:10:35 pelle
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
! * The NamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
--- 36,40 ----
* Revision 1.1 2003/02/14 21:10:35 pelle
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
! * The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
***************
*** 33,37 ****
*/
! import org.neuclear.id.NamedObject;
import org.neudist.utils.NeudistException;
import org.neudist.utils.Utility;
--- 42,46 ----
*/
! import org.neuclear.id.SignedNamedObject;
import org.neudist.utils.NeudistException;
import org.neudist.utils.Utility;
***************
*** 46,50 ****
public class SmtpSender extends Sender {
! public void send(String endpoint, NamedObject obj) throws NeudistException {
Properties props = System.getProperties();
if (endpoint.startsWith("mailto:"))
--- 55,59 ----
public class SmtpSender extends Sender {
! public void send(String endpoint, SignedNamedObject obj) throws NeudistException {
Properties props = System.getProperties();
if (endpoint.startsWith("mailto:"))
Index: SoapSender.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders/SoapSender.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** SoapSender.java 23 Sep 2003 19:16:28 -0000 1.3
--- SoapSender.java 24 Sep 2003 23:56:48 -0000 1.4
***************
*** 8,11 ****
--- 8,20 ----
* $Id$
* $Log$
+ * Revision 1.4 2003/09/24 23:56:48 pelle
+ * Refactoring nearly done. New model for creating signed objects.
+ * With view for supporting the xmlpull api shortly for performance reasons.
+ * Currently still uses dom4j but that has been refactored out that it
+ * should now be very quick to implement a xmlpull implementation.
+ *
+ * A side benefit of this is that the API has been further simplified. I still have some work
+ * todo with regards to cleaning up some of the outlying parts of the code.
+ *
* Revision 1.3 2003/09/23 19:16:28 pelle
* Changed NameSpace to Identity.
***************
*** 27,31 ****
* Revision 1.1 2003/02/14 21:10:35 pelle
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
! * The NamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
--- 36,40 ----
* Revision 1.1 2003/02/14 21:10:35 pelle
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
! * The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
***************
*** 33,37 ****
*/
! import org.neuclear.id.NamedObject;
import org.neudist.utils.NeudistException;
import org.neudist.xml.soap.SOAPTools;
--- 42,46 ----
*/
! import org.neuclear.id.SignedNamedObject;
import org.neudist.utils.NeudistException;
import org.neudist.xml.soap.SOAPTools;
***************
*** 39,43 ****
public class SoapSender extends Sender {
! public void send(String endpoint, NamedObject obj) throws NeudistException {
SOAPTools.soapRequest(endpoint, obj.getElement(), "/receive");
}
--- 48,52 ----
public class SoapSender extends Sender {
! public void send(String endpoint, SignedNamedObject obj) throws NeudistException {
SOAPTools.soapRequest(endpoint, obj.getElement(), "/receive");
}
|