Author: simonetripodi
Date: Fri Feb 26 22:06:12 2010
New Revision: 916835

URL: http://svn.apache.org/viewvc?rev=916835&view=rev
Log:
first checkin of AccessStorage class

Added:
    
labs/amber/server/src/main/java/org/apache/labs/amber/server/AccessStorage.java 
  (with props)

Added: 
labs/amber/server/src/main/java/org/apache/labs/amber/server/AccessStorage.java
URL: 
http://svn.apache.org/viewvc/labs/amber/server/src/main/java/org/apache/labs/amber/server/AccessStorage.java?rev=916835&view=auto
==============================================================================
--- 
labs/amber/server/src/main/java/org/apache/labs/amber/server/AccessStorage.java 
(added)
+++ 
labs/amber/server/src/main/java/org/apache/labs/amber/server/AccessStorage.java 
Fri Feb 26 22:06:12 2010
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.labs.amber.server;
+
+/**
+ * Nonce/timestamp storage definition.
+ *
+ * @version $Id$
+ */
+public interface AccessStorage {
+
+    /**
+     * Stores a new nonce / timestamp pair associated with a consumer key.
+     *
+     * @param clientCredentials the consumer to be associated with the access
+     * @param timestamp the timestamp of the request
+     * @param nonce the nonce associated with the timestamp
+     * @throws AccessStorageException if a backend error occurs
+     */
+    void add(String clientCredentials, long timestamp, String nonce) throws 
AccessStorageException;
+
+    /**
+     * Get the last access (by timestamp) of a consumer.
+     *
+     * @param clientCredentials the consumer whose access needs to be read
+     * @return the access object
+     * @throws AccessStorageException if a backend error occurs
+     */
+    Access getLastAccess(String clientCredentials) throws 
AccessStorageException;
+
+    /**
+     * Remove a consumer access.
+     *
+     * @param clientCredentials the consumer key
+     * @param timestamp the timestamp
+     * @throws AccessStorageException if a backend error occurs
+     */
+    void remove(String clientCredentials, long timestamp) throws 
AccessStorageException;
+
+}

Propchange: 
labs/amber/server/src/main/java/org/apache/labs/amber/server/AccessStorage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
labs/amber/server/src/main/java/org/apache/labs/amber/server/AccessStorage.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: 
labs/amber/server/src/main/java/org/apache/labs/amber/server/AccessStorage.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to