de.deepamehta.core.service
Class ClientState

Show UML class diagram
java.lang.Object
  extended by de.deepamehta.core.service.ClientState

public class ClientState
extends Object

Cookies sent by a client.


Field Summary
private  Map<String,String> values
           
 
Constructor Summary
ClientState(String cookie)
          Converts a "Cookie" header value (String) to a map (key=String, value=String).
 
Method Summary
 String get(String name)
          Returns the value of the cookie for the given name, or throws an exception if no such cookie exists.
 long getLong(String name)
          Convenience method to access a long value of the cookie for the given name, or throws an exception if no such cookie exists.
 boolean has(String name)
          Checks if there is a cookie with the given name.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

values

private Map<String,String> values
Constructor Detail

ClientState

public ClientState(String cookie)
Converts a "Cookie" header value (String) to a map (key=String, value=String). E.g. "dm4_workspace_id=123; dm4_topicmap_id=234" => {"dm4_workspace_id"="123", "dm4_topicmap_id"="234"}

Called by JAX-RS container to create a ClientState from a "Cookie" @HeaderParam

Method Detail

get

public String get(String name)
Returns the value of the cookie for the given name, or throws an exception if no such cookie exists.


getLong

public long getLong(String name)
Convenience method to access a long value of the cookie for the given name, or throws an exception if no such cookie exists.


has

public boolean has(String name)
Checks if there is a cookie with the given name.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014. All Rights Reserved.