[infinispan-commits] Infinispan SVN: r795 - trunk/core/src/main/java/org/infinispan/remoting.
infinispan-commits at lists.jboss.org
infinispan-commits at lists.jboss.org
Tue Sep 8 23:39:10 EDT 2009
Author: michael.neale at jboss.com
Date: 2009-09-08 23:39:10 -0400 (Tue, 08 Sep 2009)
New Revision: 795
Added:
trunk/core/src/main/java/org/infinispan/remoting/MIMECacheEntry.java
Log:
ISPN-161 Needed for RESTful interface (only core dep).
Added: trunk/core/src/main/java/org/infinispan/remoting/MIMECacheEntry.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/remoting/MIMECacheEntry.java (rev 0)
+++ trunk/core/src/main/java/org/infinispan/remoting/MIMECacheEntry.java 2009-09-09 03:39:10 UTC (rev 795)
@@ -0,0 +1,40 @@
+package org.infinispan.remoting;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * Wrapper object for entries that arrive via RESTful PUT/POST interface.
+ * @author Michael Neale
+ * @since 4.0
+ */
+public class MIMECacheEntry implements Serializable {
+
+ /**
+ * The MIME <a href="http://en.wikipedia.org/wiki/MIME">Content type</a>
+ * value, for example application/octet-stream.
+ * Often used in HTTP headers.
+ */
+ public String contentType;
+
+
+ /**
+ * The payload. The actual form of the contents depends on the contentType field.
+ * Will be String data if the contentType is application/json, application/xml or text/*
+ */
+ public byte[] data;
+
+
+ /**
+ * The date the entry was created...
+ */
+ public Date lastModified = new Date();
+
+ public MIMECacheEntry() {}
+
+ public MIMECacheEntry(String contentType, byte[] data) {
+ this.contentType = contentType;
+ this.data = data;
+ }
+
+}
More information about the infinispan-commits
mailing list