/** * Sets the modifiable list of required server protocols. This method clears * the current list and adds all entries in the parameter list. * * @param serverProtocols * A list of required server protocols. */ public void setServerProtocols(List<Protocol> serverProtocols) { synchronized (getServerProtocols()) { if (serverProtocols != getServerProtocols()) { getServerProtocols().clear(); if (serverProtocols != null) { getServerProtocols().addAll(serverProtocols); } } } }
@Override public Restlet createInboundRoot() { getConnectorService().getClientProtocols().add(Protocol.CLAP); getConnectorService().getServerProtocols().add(Protocol.HTTP); final Directory directory = new Directory(getContext(), "clap://class"); directory.setListingAllowed(true); directory.setDeeplyAccessible(true); return directory; } };
.getServerProtocols() != null) { for (Protocol serverProtocol : application .getConnectorService().getServerProtocols()) { boolean serverFound = false;