Class FileResourceSystemService
- java.lang.Object
-
- net.officefloor.web.resource.file.FileResourceSystemService
-
- All Implemented Interfaces:
ServiceFactory<ResourceSystemFactory>
,ResourceSystemFactory
,ResourceSystemService
public class FileResourceSystemService extends java.lang.Object implements ResourceSystemFactory, ResourceSystemService
ResourceSystemFactory
backed by files.- Author:
- Daniel Sagenschneider
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROTOCOL_NAME
Protocol name.
-
Constructor Summary
Constructors Constructor Description FileResourceSystemService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceSystem
createResourceSystem(ResourceSystemContext context)
Creates theResourceSystem
.ResourceSystemFactory
createService(ServiceContext context)
Creates the service.java.lang.String
getProtocolName()
Obtains the protocol name for the createdResourceSystem
.
-
-
-
Field Detail
-
PROTOCOL_NAME
public static final java.lang.String PROTOCOL_NAME
Protocol name.- See Also:
- Constant Field Values
-
-
Method Detail
-
createService
public ResourceSystemFactory createService(ServiceContext context) throws java.lang.Throwable
Description copied from interface:ServiceFactory
Creates the service.- Specified by:
createService
in interfaceServiceFactory<ResourceSystemFactory>
- Parameters:
context
-ServiceContext
.- Returns:
- Service.
- Throws:
java.lang.Throwable
- If fails to create the service.
-
getProtocolName
public java.lang.String getProtocolName()
Description copied from interface:ResourceSystemFactory
Obtains the protocol name for the created
ResourceSystem
.The protocol name is used as follows
[protocol]:location
to configure aResourceSystem
.- Specified by:
getProtocolName
in interfaceResourceSystemFactory
- Returns:
- Protocol name for the created
ResourceSystem
.
-
createResourceSystem
public ResourceSystem createResourceSystem(ResourceSystemContext context) throws java.io.IOException
Description copied from interface:ResourceSystemFactory
Creates theResourceSystem
.- Specified by:
createResourceSystem
in interfaceResourceSystemFactory
- Parameters:
context
-ResourceSystemContext
.- Returns:
ResourceSystem
.- Throws:
java.io.IOException
- If fails to create theResourceSystem
.
-
-