Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.red5.server.api.stream
Interface IStreamFilenameGenerator

All Superinterfaces:
  IScopeService

All Known Implementing Classes:
  DefaultStreamFilenameGenerator

    public interface IStreamFilenameGenerator

extends IScopeService

A class that can generate filenames for streams.

Author:
  The Red5 Project (red5@osflash.org), Joachim Bauch (bauch@struktur.de)

Nested Class Summary
`static class` | `IStreamFilenameGenerator.GenerationType` Possible filename generation types.

Field Summary
`static String` | `BEAN_NAME` Name of the bean to setup a custom filename generator in an application.

Method Summary
`String` | `generateFilename(IScope scope, String name, IStreamFilenameGenerator.GenerationType type)` Generate a filename without an extension.
`String` | `generateFilename(IScope scope, String name, String extension, IStreamFilenameGenerator.GenerationType type)` Generate a filename with an extension.
`boolean` | `resolvesToAbsolutePath()` True if returned filename is an absolute path, else relative to application.

Field Detail

### BEAN_NAME

    static final String BEAN_NAME

  Name of the bean to setup a custom filename generator in an application.

  See Also:
    Constant Field Values

Method Detail

### generateFilename

    String generateFilename(IScope scope,
                            String name,
                            IStreamFilenameGenerator.GenerationType type)

  Generate a filename without an extension.

  Parameters:
    `scope` - Scope to use
    `name` - Stream name
    `type` - Generation strategy (either playback or record)
  Returns:
    Full filename

### generateFilename

    String generateFilename(IScope scope,
                            String name,
                            String extension,
                            IStreamFilenameGenerator.GenerationType type)

  Generate a filename with an extension.

  Parameters:
    `scope` - Scope to use
    `name` - Stream filename
    `extension` - Extension
    `type` - Generation strategy (either playback or record)
  Returns:
    Full filename with extension

### resolvesToAbsolutePath

    boolean resolvesToAbsolutePath()

  True if returned filename is an absolute path, else relative to application. If relative to application, you need to use `scope.getContext().getResources(fileName)[0].getFile()` to resolve this to a file. If absolute (ie returns true) simply use `new File(generateFilename(scope, name))`

  Returns:
    true if an absolute path; else false

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2010 The Red5 Project