|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.semispace.ws.client.SemiSpaceTokenProxy
public class SemiSpaceTokenProxy
Method Summary | |
---|---|
String |
getPassword()
|
String |
getUsername()
|
boolean |
hasToken()
If a token is present, you are authenticated |
SemiEventRegistration |
notify(Object template,
SemiEventListener listener,
long duration)
Notify is illegal to use in proxy |
Object |
read(Object template,
long duration)
Read an object from the space, which has matching fields (or getters) with the template |
Object |
readIfExists(Object template)
Same as read, with duration 0 |
protected static TokenWsSpace |
readSpaceServiceAsSpring()
An alternative way of performing lookup |
protected static TokenWsSpace |
readSpaceServiceAsStandardPort()
|
protected static TokenWsSpace |
readSpaceServiceAsStandardPort(String endpointAddress)
|
static SemiSpaceTokenProxy |
retrieveSpace(String endpoint)
Open WS connection to the defined end point. |
protected static SemiSpaceTokenProxy |
retrieveSpace(TokenWsSpace space)
This is a bit roundabout, but is used for junit purposes. |
void |
setPassword(String password)
|
protected void |
setSpace(TokenWsSpace space)
|
void |
setUsername(String username)
|
Object |
take(Object template,
long duration)
Same as read, except that the object is removed from the space. |
Object |
takeIfExists(Object template)
Same as take, with a duration of 0 |
SemiLease |
write(Object obj,
long duration)
TODO Consider fixing that null is always returned. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public String getUsername()
public void setUsername(String username)
public String getPassword()
public void setPassword(String password)
public static SemiSpaceTokenProxy retrieveSpace(String endpoint)
protected static TokenWsSpace readSpaceServiceAsSpring()
protected static TokenWsSpace readSpaceServiceAsStandardPort()
protected static TokenWsSpace readSpaceServiceAsStandardPort(String endpointAddress)
protected static SemiSpaceTokenProxy retrieveSpace(TokenWsSpace space)
public SemiEventRegistration notify(Object template, SemiEventListener listener, long duration)
notify
in interface SemiSpaceInterface
template
- Template to be matched.listener
- Listener to be notified when object with a matching template is foundduration
- How long this particular listener is valid.
public Object read(Object template, long duration)
SemiSpaceInterface
read
in interface SemiSpaceInterface
template
- Object of exactly the same type as what
is wanted as return value, with zero or more none-null fields or getters.duration
- How long you are willing to wait for an answer / match.
public Object readIfExists(Object template)
SemiSpaceInterface
readIfExists
in interface SemiSpaceInterface
SemiSpaceInterface.read(Object, long)
public Object take(Object template, long duration)
SemiSpaceInterface
take
in interface SemiSpaceInterface
SemiSpaceInterface.read(Object, long)
public Object takeIfExists(Object template)
SemiSpaceInterface
takeIfExists
in interface SemiSpaceInterface
SemiSpaceInterface.take(Object, long)
,
SemiSpaceInterface.read(Object, long)
public SemiLease write(Object obj, long duration)
write
in interface SemiSpaceInterface
obj
- Object to be written into the spaceduration
- Life time in milliseconds of the written object
SemiSpaceInterface.write(java.lang.Object, long)
public boolean hasToken()
protected void setSpace(TokenWsSpace space)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |