Package com.iizix.server
Interface IEndPointConstructor<OBJECT>
- All Known Implementing Classes:
ClientEndPointConstructor
,RemoteBuilderEndPointConstructor
,VirtualizedMonitorEndPointConstructor
,VSViewerEndPointConstructor
public interface IEndPointConstructor<OBJECT>
Interface for plug-ins used to create a new end point.
- Author:
- Christopher Mindus
Method Summary
Modifier and TypeMethodDescriptioncreateInstance
(ServerShell server, long sessionID, IWebSocketComm comm, String uri, String query, Map<String, List<String>> headerFields, OBJECT object) Creates a new end point.String[]
Gets the list of potential handled context paths for the websocket.isHandled
(ServerShell server, IWebSocketComm comm, String uri, String query, Map<String, List<String>> headerFields) Checks if this end point constructor handles this URI.
Method Details
getHandledContextPaths
String[] getHandledContextPaths()Gets the list of potential handled context paths for the websocket.- Returns:
- The array of possibly handled context paths, or
null
for none.
isHandled
OBJECT isHandled(ServerShell server, IWebSocketComm comm, String uri, String query, Map<String, List<String>> headerFields) throws IOExceptionChecks if this end point constructor handles this URI.- Parameters:
server
- Server shell.comm
- The Web Socket communication properties.uri
- The URI.query
- The Query (after the URI).headerFields
- HTTP header fields, null for a pre-check of the handled state, to avoid processing a request further to e.g. negotiate WebSocket protocol.- Returns:
- An Object if handled, null when not handled. This Object is passed in to the
createInstance()
method when theheaderFields
are non-null and the construction should take place. - Throws:
IOException
- For communications failure.
createInstance
IEndPoint createInstance(ServerShell server, long sessionID, IWebSocketComm comm, String uri, String query, Map<String, List<String>> headerFields, OBJECT object) throws IOExceptionCreates a new end point.- Parameters:
server
- Server shell.sessionID
- The session ID.comm
- The Web Socket communication properties.uri
- The URI.query
- The Query (after the URI).headerFields
- HTTP header fields.object
- The Object returned inisHandled()
.- Returns:
- The new end point.
- Throws:
IOException
- For communications failure.