Coverage Report - org.semispace.ws.TokenWsSpace
 
Classes in this File Line Coverage Branch Coverage Complexity
TokenWsSpace
N/A
N/A
1
 
 1  
 /*
 2  
  * ============================================================================
 3  
  *
 4  
  *  File:     TokenWsSpace.java
 5  
  *----------------------------------------------------------------------------
 6  
  *
 7  
  * Copyright 2008 Erlend Nossum
 8  
  *
 9  
  * Licensed under the Apache License, Version 2.0 (the "License"); 
 10  
  * you may not use this file except in compliance with the License. 
 11  
  * You may obtain a copy of the License at 
 12  
  *
 13  
  *   http://www.apache.org/licenses/LICENSE-2.0
 14  
  *
 15  
  * Unless required by applicable law or agreed to in writing, software
 16  
  * distributed under the License is distributed on an "AS IS" BASIS,
 17  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 18  
  * See the License for the specific language governing permissions and 
 19  
  * limitations under the License.
 20  
  *
 21  
  *  Description:  See javadoc below
 22  
  *
 23  
  *  Created:      Mar 16, 2008
 24  
  * ============================================================================ 
 25  
  */
 26  
 
 27  
 package org.semispace.ws;
 28  
 
 29  
 import javax.jws.WebService;
 30  
 
 31  
 /**
 32  
  * Web services definition for token authenticated space.
 33  
  * Other than insisting that a token is supplied for each operation,
 34  
  * the space is equal to the WsSpace
 35  
  * 
 36  
  * <p>
 37  
  * Notice that the token may be a session variable, and when using
 38  
  * an invalid token, you will get errors. In that case, you need to 
 39  
  * re-authenticate and try the query again. In other words, the
 40  
  * query itself may be wrong if you get the same erroneous result 
 41  
  * twice - once before re-authenticating, once after.
 42  
  * </p>
 43  
  * @see WsSpace
 44  
  */
 45  
 @WebService
 46  
 public interface TokenWsSpace {
 47  
     /**
 48  
      * Login the user, and return a token if authenticated.
 49  
      */
 50  
     public String login( String username, String password);
 51  
     public void write( String token, String contents, long timeToLiveMs );
 52  
     public String read( String token, String template, long queryLifeMs );
 53  
     public String readIfExists( String token, String template );
 54  
     public String take( String token, String template, long queryLifeMs );
 55  
     public String takeIfExists( String token, String template );
 56  
 
 57  
 }