Package jmri.server.json.signalhead
Class JsonSignalHeadServiceFactory
- java.lang.Object
- 
- jmri.server.json.signalhead.JsonSignalHeadServiceFactory
 
- 
- All Implemented Interfaces:
- JmriServiceProviderInterface,- JsonServiceFactory<JsonSignalHeadHttpService,JsonSignalHeadSocketService>
 
 public class JsonSignalHeadServiceFactory extends java.lang.Object implements JsonServiceFactory<JsonSignalHeadHttpService,JsonSignalHeadSocketService> 
- 
- 
Constructor SummaryConstructors Constructor Description JsonSignalHeadServiceFactory()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonSignalHeadHttpServicegetHttpService(com.fasterxml.jackson.databind.ObjectMapper mapper, java.lang.String version)Create a JSON HTTP service.JsonSignalHeadSocketServicegetSocketService(JsonConnection connection, java.lang.String version)Create a JSON service for the given connection.java.lang.String[]getTypes(java.lang.String version)Get the service type(s) for services created by this factory respond to.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface jmri.spi.JsonServiceFactorygetReceivedTypes, getSentTypes
 
- 
 
- 
- 
- 
Constructor Detail- 
JsonSignalHeadServiceFactorypublic JsonSignalHeadServiceFactory() 
 
- 
 - 
Method Detail- 
getTypespublic java.lang.String[] getTypes(java.lang.String version) Description copied from interface:JsonServiceFactoryGet the service type(s) for services created by this factory respond to. These type must have valid schemas for messages received from a client and sent to a client.Types should be single words, in camelCase if needed, unless supporting a plural noun introduced in the JSON 1.x or 2.x protocols and exposed in the JSON 3.0 or newer protocol. If a service returns no types, it will never be used. - Specified by:
- getTypesin interface- JsonServiceFactory<JsonSignalHeadHttpService,JsonSignalHeadSocketService>
- Parameters:
- version- The JSON protocol version major component identifier
- Returns:
- An array of types this service responds to
 
 - 
getSocketServicepublic JsonSignalHeadSocketService getSocketService(JsonConnection connection, java.lang.String version) Description copied from interface:JsonServiceFactoryCreate a JSON service for the given connection. This connection can be a WebSocket or raw socket.- Specified by:
- getSocketServicein interface- JsonServiceFactory<JsonSignalHeadHttpService,JsonSignalHeadSocketService>
- Parameters:
- connection- The connection for this service to respond to
- version- The JSON protocol version major component identifier
- Returns:
- A service or null if the service does not support sockets
 
 - 
getHttpServicepublic JsonSignalHeadHttpService getHttpService(com.fasterxml.jackson.databind.ObjectMapper mapper, java.lang.String version) Description copied from interface:JsonServiceFactoryCreate a JSON HTTP service.- Specified by:
- getHttpServicein interface- JsonServiceFactory<JsonSignalHeadHttpService,JsonSignalHeadSocketService>
- Parameters:
- mapper- The object mapper for the HTTP service to use
- version- The JSON protocol version major component identifier
- Returns:
- A servlet or null if the service does not support HTTP
 
 
- 
 
-