public class HttpServer extends ForwardingKnowledgeStore implements Component
Modifier and Type | Class and Description |
---|---|
static class |
HttpServer.Builder |
Modifier and Type | Method and Description |
---|---|
static HttpServer.Builder |
builder(KnowledgeStore delegate) |
void |
close()
Closes the
KnowledgeStore instance, releasing any resource possibly
allocated. |
protected KnowledgeStore |
delegate() |
void |
init()
Initializes the
Component with the supplied Runtime object. |
boolean |
isClosed()
Tests whether this
KnowledgeStore instance has been closed. |
Session |
newSession()
Creates a new anonymous user session.
|
Session |
newSession(String username,
String password)
Creates a new user session, using the optional username and password specified.
|
toString
protected KnowledgeStore delegate()
delegate
in class ForwardingKnowledgeStore
public void init() throws IOException
Component
Component
with the supplied Runtime
object. This method is
called after the instantiation of a Component
and before any other instance method
is called. It provides a Runtime
that can be used to access runtime services such
as locking, serialization and filesystem access. The Component
is allowed to
perform any initialization operation that is necessary in order to become functional; on
failure, these operations may result in a IOException
being thrown.init
in interface Component
IOException
- in case initialization failspublic Session newSession() throws IllegalStateException
KnowledgeStore
Session
depend on the security settings for anonymous users of the KnowledgeStore
instance.newSession
in interface KnowledgeStore
newSession
in class ForwardingKnowledgeStore
Session
IllegalStateException
- in case the KnowledgeStore
instance has been closedpublic Session newSession(String username, String password) throws IllegalStateException
KnowledgeStore
Session
depend on the security settings
for the specific authenticated user of the KnowledgeStore instance.newSession
in interface KnowledgeStore
newSession
in class ForwardingKnowledgeStore
username
- the username, possibly nullpassword
- the user password, possibly nullSession
IllegalStateException
- in case the KnowledgeStore
instance has been closedpublic boolean isClosed()
KnowledgeStore
KnowledgeStore
instance has been closed.isClosed
in interface KnowledgeStore
isClosed
in class ForwardingKnowledgeStore
KnowledgeStore
instance has been closedpublic void close()
KnowledgeStore
KnowledgeStore
instance, releasing any resource possibly
allocated. Calling this method additional times has no effect. After this method is called,
calls to other methods of the KnowledgeStore
interface will result in
IllegalStateException
s being thrown.close
in interface KnowledgeStore
close
in interface Component
close
in interface Closeable
close
in interface AutoCloseable
close
in class ForwardingKnowledgeStore
public static HttpServer.Builder builder(KnowledgeStore delegate)
Copyright © 2015–2016 FBK-irst. All rights reserved.