org.semispace.ws
Class TokenWsSpaceImpl
java.lang.Object
org.semispace.ws.TokenWsSpaceImpl
- All Implemented Interfaces:
- TokenWsSpace
public class TokenWsSpaceImpl
- extends Object
- implements TokenWsSpace
All methods will throw RuntimeException if the token is not found to be OK. Otherwise, the operation in question is
just relayed to WsSpaceImpl.
You need to set both the space and the authenticator.
- See Also:
WsSpaceImpl
Method Summary |
String |
login(String username,
String password)
Login the user, and return a token if authenticated. |
String |
read(String token,
String template,
long queryLifeMs)
|
String |
readIfExists(String token,
String template)
|
void |
setSpace(SemiSpace space)
For the benefit of spring |
void |
setTokenAuthenticator(TokenAuthenticator auth)
|
String |
take(String token,
String template,
long queryLifeMs)
|
String |
takeIfExists(String token,
String template)
|
void |
write(String token,
String contents,
long timeToLiveMs)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TokenWsSpaceImpl
public TokenWsSpaceImpl()
setTokenAuthenticator
public void setTokenAuthenticator(TokenAuthenticator auth)
setSpace
public void setSpace(SemiSpace space)
- For the benefit of spring
login
public String login(String username,
String password)
- Description copied from interface:
TokenWsSpace
- Login the user, and return a token if authenticated.
- Specified by:
login
in interface TokenWsSpace
read
public String read(String token,
String template,
long queryLifeMs)
- Specified by:
read
in interface TokenWsSpace
readIfExists
public String readIfExists(String token,
String template)
- Specified by:
readIfExists
in interface TokenWsSpace
take
public String take(String token,
String template,
long queryLifeMs)
- Specified by:
take
in interface TokenWsSpace
takeIfExists
public String takeIfExists(String token,
String template)
- Specified by:
takeIfExists
in interface TokenWsSpace
write
public void write(String token,
String contents,
long timeToLiveMs)
- Specified by:
write
in interface TokenWsSpace
Copyright © 2008-2012. All Rights Reserved.