public class WebComponentProvider extends SynchronizedRequestHandler
Constructor and Description |
---|
WebComponentProvider() |
Modifier and Type | Method and Description |
---|---|
protected String |
bootstrapNpm() |
protected boolean |
canHandleRequest(VaadinRequest request)
Check whether a request may be handled by this handler.
|
protected String |
generateNPMResponse(String tagName,
VaadinRequest request,
VaadinResponse response)
Generate the npm response for the web component.
|
boolean |
isCacheEnabled()
Whether bootstrap HTML fragment are cached based on component tag.
|
void |
setCacheEnabled(boolean cacheEnabled)
Enable / disable bootstrap HTML fragment caching based on component tag.
|
boolean |
synchronizedHandleRequest(VaadinSession session,
VaadinRequest request,
VaadinResponse response)
Identical to
SynchronizedRequestHandler.handleRequest(VaadinSession, VaadinRequest, VaadinResponse)
except the VaadinSession is locked before this is called and
unlocked after this has completed. |
handleRequest
protected boolean canHandleRequest(VaadinRequest request)
SynchronizedRequestHandler
true
which means that all requests will be handled by
calling
SynchronizedRequestHandler.synchronizedHandleRequest(VaadinSession, VaadinRequest, VaadinResponse)
with the session locked.canHandleRequest
in class SynchronizedRequestHandler
request
- the request to handletrue
if the request handling should continue once
the session has been locked; false
if there's no
need to lock the session since the request would still not be
handled.public boolean synchronizedHandleRequest(VaadinSession session, VaadinRequest request, VaadinResponse response) throws IOException
SynchronizedRequestHandler
SynchronizedRequestHandler.handleRequest(VaadinSession, VaadinRequest, VaadinResponse)
except the VaadinSession
is locked before this is called and
unlocked after this has completed.synchronizedHandleRequest
in class SynchronizedRequestHandler
session
- The session for the requestrequest
- The request to handleresponse
- The response object to which a response can be written.IOException
- If an IO error occurredSynchronizedRequestHandler.handleRequest(VaadinSession, VaadinRequest, VaadinResponse)
public boolean isCacheEnabled()
public void setCacheEnabled(boolean cacheEnabled)
cacheEnabled
- whether bootstrap fragments should be cached per tagprotected String generateNPMResponse(String tagName, VaadinRequest request, VaadinResponse response)
tagName
- tag name of componentrequest
- current VaadinRequestresponse
- current VaadinResponseprotected String bootstrapNpm()
Copyright © 2021. All rights reserved.