org.semispace.ws
Interface WsSpace

All Known Implementing Classes:
WsSpaceImpl

public interface WsSpace

Proxy interface for SemiSpace. Everything defined as string is supplied as XML, instead of Objects. Otherwise it is equal to the SemiSpace interface.


Method Summary
 String read(String template, long queryLifeMs)
          Supply an XML template, which will be matched on the first.
 String readIfExists(String template)
          Read without any timeout; You get an answer immediately
 String take(String template, long queryLifeMs)
          Same as read, except that the entry is removed from the space.
 String takeIfExists(String template)
           
 void write(String contents, long timeToLiveMs)
          Put XML structured data into space with given lifetime
 

Method Detail

write

void write(String contents,
           long timeToLiveMs)
Put XML structured data into space with given lifetime

Parameters:
contents - XML data

read

String read(String template,
            long queryLifeMs)
Supply an XML template, which will be matched on the first. In other words, the following template will be matched on firstname only:
 
   Erlend
   
      SemiSpace
   
 
The entry is left in the space

Parameters:
template - XML template
queryLifeMs - Life of query in milliseconds. Notice that you will want to repeatedly read instead of having a very long timeout (i.e. more than 30 seconds)

readIfExists

String readIfExists(String template)
Read without any timeout; You get an answer immediately

See Also:
read(String, long)

take

String take(String template,
            long queryLifeMs)
Same as read, except that the entry is removed from the space.

See Also:
read(String, long)

takeIfExists

String takeIfExists(String template)
See Also:
take(String, long)


Copyright © 2008-2012. All Rights Reserved.