org.spincast.plugins.routing.SpincastWebsocketRoute Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-plugins-routing Show documentation
Show all versions of spincast-plugins-routing Show documentation
The default Spincast Routing plugin
The newest version!
package org.spincast.plugins.routing;
import java.util.List;
import javax.annotation.Nullable;
import org.spincast.core.exchange.IRequestContext;
import org.spincast.core.routing.IHandler;
import org.spincast.core.websocket.IWebsocketContext;
import org.spincast.core.websocket.IWebsocketController;
import org.spincast.core.websocket.IWebsocketRoute;
import com.google.inject.assistedinject.Assisted;
import com.google.inject.assistedinject.AssistedInject;
public class SpincastWebsocketRoute, W extends IWebsocketContext>>
implements IWebsocketRoute {
private final String id;
private final String path;
private final List> beforeFilters;
private final IWebsocketController websocketController;
/**
* Constructor
*/
@AssistedInject
public SpincastWebsocketRoute(@Assisted("id") @Nullable String id,
@Assisted("path") String path,
@Assisted("before") @Nullable List> beforeFilters,
@Assisted("controller") IWebsocketController websocketController) {
this.id = id;
this.path = path;
this.beforeFilters = beforeFilters;
this.websocketController = websocketController;
}
@Override
public String getId() {
return this.id;
}
@Override
public String getPath() {
return this.path;
}
@Override
public List> getBeforeFilters() {
return this.beforeFilters;
}
@Override
public IWebsocketController getWebsocketController() {
return this.websocketController;
}
@Override
public String toString() {
return "Websocket route - " + (getId() != null ? (getId() + " - ") : "") + getPath();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy