All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Foundation |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

*** This class provides Binary Compatibility only, not Source Compatibility ***

## com.sas.services.publish
Class TransportFactory

    com.sas.services.publish.TransportFactory

    public class TransportFactory

A factory used to manufacture delivery transport objects. Each delivery transport implements the `TransportInterface`. A delivery transport is a method of delivering a result set package to the consumer. Each delivery transport provides a mechanism for publishing the result package and retrieving a result package. How the result package is delivered is transport-specific.

The supported delivery transports are listed below. View the javadoc for specific details on each delivery transport.

- `Archive`
- `Channel`
- `WebDAV`
- `Requester`

Since:
  1.0

Constructor Summary
`TransportFactory()`

Method Summary
`ArchiveTransportInterface` | `getArchiveTransport(java.io.File file, LoggerInterface logger, SessionContextInterface sessionContext)` Deprecated. The Logging Service has been deprecated. Use `getArchiveTransport(File, SessionContextInterface)`
`ArchiveTransportInterface` | `getArchiveTransport(java.io.File file, SessionContextInterface sessionContext)` Creates an instance of the archive transport.
`ChannelTransportInterface` | `getChannelTransport(ChannelInterface channel, LoggerInterface logger, SessionContextInterface sessionContext)` Deprecated. use `getChannelTransport(ChannelInterface, SessionContextInterface)`
`ChannelTransportInterface` | `getChannelTransport(ChannelInterface channel, SessionContextInterface sessionContext)` Creates an instance of the Channel transport.
`DAVTransportInterface` | `getDAVTransport(ContentDestination content, LoggerInterface logger, SessionContextInterface sessionContext)` Deprecated. Use `getDAVTransport(ContentDestination, SessionContextInterface)`
`DAVTransportInterface` | `getDAVTransport(ContentDestination content, SessionContextInterface sessionContext)` Creates an instance of the WebDAV transport that can be used to publish a result package to a WebDAV server, and to retrieve a result package from a WebDAV server.
`DAVTransportInterface` | `getDAVTransport(java.lang.String url, java.lang.String domain, LoggerInterface logger, SessionContextInterface sessionContext)` Deprecated. Use `getDAVTransport(String, String, SessionContextInterface)`
`DAVTransportInterface` | `getDAVTransport(java.lang.String url, java.lang.String domain, SessionContextInterface sessionContext)` Creates an instance of the WebDAV transport.
`DAVTransportInterface` | `getDAVTransport(java.lang.String url, java.lang.String username, java.lang.String password, LoggerInterface logger, SessionContextInterface sessionContext)` Deprecated. Use `getDAVTransportWithCredentials(String, String, String, SessionContextInterface)`
`DAVTransportInterface` | `getDAVTransportWithCredentials(java.lang.String url, java.lang.String username, java.lang.String password, SessionContextInterface sessionContext)` Creates an instance of the WebDAV transport.
`RequesterTransportInterface` | `getRequesterTransport(com.sas.iom.SAS.IResultPackage resultPackage, LoggerInterface logger, SessionContextInterface sessionContext)` Deprecated. Use `getRequesterTransport(IResultPackage, SessionContextInterface)`
`RequesterTransportInterface` | `getRequesterTransport(com.sas.iom.SAS.IResultPackage resultPackage, SessionContextInterface sessionContext)` Creates an instance of the requester transport using an IResultPackage.
`RequesterTransportInterface` | `getRequesterTransport(com.sas.iom.SAS.IWorkspace workspace, java.lang.String transportInformation, java.lang.String[][] properties, LoggerInterface logger, SessionContextInterface sessionContext)` Deprecated. use `getRequesterTransport(IWorkspace, String, String[][], SessionContextInterface)`
`RequesterTransportInterface` | `getRequesterTransport(com.sas.iom.SAS.IWorkspace workspace, java.lang.String transportInformation, java.lang.String[][] properties, SessionContextInterface sessionContext)` Creates an instance of the requester transport using the transport information specified.

Constructor Detail

### TransportFactory

    public TransportFactory()

Method Detail

### getArchiveTransport

    public ArchiveTransportInterface getArchiveTransport(java.io.File file,
                                                         LoggerInterface logger,
                                                         SessionContextInterface sessionContext)
                                                  throws TransportException

  Deprecated. The Logging Service has been deprecated. Use `getArchiveTransport(File, SessionContextInterface)`

  Creates an instance of the archive transport. The archive transport provides a mechanism for publishing a result package to an archive (.spk file), and for retrieving a result package from an archive.

  Session-based applications can specify a session context. When a result package is retrieved from an archive, the archive transport will track the retrieved result package in the specified session context. If the session context is destroyed, the result package will be closed and resources will be freed. When a session context is specified, it is important for the calling application to close the result package when it is done using it. If the result package is not closed, it will remain in the session context and garbage collection will not occur until the session context is destroyed. The result package should be closed to ensure that it is removed from the session context.

  By default, the publish services will not provide any logging. The publish services will utilize logging only if a session context or a logger is specified. If a logger is specified, it will take precedence and will be used for logging publish activities. If a session context is specified but the logger is `null`, the logger contained within the session context will be used for logging purposes.

  Parameters:
    `file` - The archive file (.spk). If publishing, this is the archive file to create. If retrieving a result package, this is the existing archive file (.spk).
    `logger` - The logger to use for logging publish activity. This can be `null`.
    `sessionContext` - The session context. This can be `null`.
  Throws:
    `java.lang.IllegalArgumentException` - If a null file is specified.
    `TransportException` - If an error occurs initializing the transport.

### getArchiveTransport

    public ArchiveTransportInterface getArchiveTransport(java.io.File file,
                                                         SessionContextInterface sessionContext)
                                                  throws TransportException

  Creates an instance of the archive transport. The archive transport provides a mechanism for publishing a result package to an archive (.spk file), and for retrieving a result package from an archive.

  Session-based applications can specify a session context. When a result package is retrieved from an archive, the archive transport will track the retrieved result package in the specified session context. If the session context is destroyed, the result package will be closed and resources will be freed. When a session context is specified, it is important for the calling application to close the result package when it is done using it. If the result package is not closed, it will remain in the session context and garbage collection will not occur until the session context is destroyed. The result package should be closed to ensure that it is removed from the session context.

  Parameters:
    `file` - The archive file (.spk). If publishing, this is the archive file to create. If retrieving a result package, this is the existing archive file (.spk).
    `sessionContext` - The session context. This can be `null`.
  Throws:
    `java.lang.IllegalArgumentException` - If a null file is specified.
    `TransportException` - If an error occurs initializing the transport.

### getDAVTransport

    public DAVTransportInterface getDAVTransport(java.lang.String url,
                                                 java.lang.String domain,
                                                 LoggerInterface logger,
                                                 SessionContextInterface sessionContext)
                                          throws TransportException

  Deprecated. Use `getDAVTransport(String, String, SessionContextInterface)`

  Creates an instance of the WebDAV transport. The WebDAV transport provides a mechanism for publishing a result package to a webDAV server, and for retrieving a result package from a webDAV server.

  Session-based applications can specify a session context. The user context contained within the session context, along with the authentication domain, will be used to determine the credentials that will be used when binding to the webDAV server. When a result package is retrieved from a WebDAV server, the WebDAV transport will track the retrieved result package in the specified session context. If the session context is destroyed, the result package will be closed and resources will be freed. When a session context is specified, it is important for the calling application to close the result package when it is done using it. If the result package is not closed, it will remain in the session context and garbage collection will not occur until the session context is destroyed. The result package should be closed to ensure that it is removed from the session context.

  By default, the publish services will not provide any logging. The publish services will utilize logging only if a session context or a logger is specified. If a logger is specified, it will take precedence and will be used for logging publish activities. If a session context is specified but the logger is `null`, the logger contained within the session context will be used for logging purposes.

  Parameters:
    `url` - The URL. If publishing, the URL identifies the collection where the result package will be published. If retrieving an existing result package, this URL identifies the collection/result package to retrieve.
    `domain` - The authentication domain. This can be `null`.
    `logger` - The logger to use for logging publish activity. This can be `null`.
    `sessionContext` - The session context. This can be `null`.
  Throws:
    `TransportException` - If an error occurs initializing the transport.

### getDAVTransport

    public DAVTransportInterface getDAVTransport(java.lang.String url,
                                                 java.lang.String domain,
                                                 SessionContextInterface sessionContext)
                                          throws TransportException

  Creates an instance of the WebDAV transport. The WebDAV transport provides a mechanism for publishing a result package to a webDAV server, and for retrieving a result package from a webDAV server.

  Session-based applications can specify a session context. The user context contained within the session context, along with the authentication domain, will be used to determine the credentials that will be used when binding to the webDAV server. When a result package is retrieved from a WebDAV server, the WebDAV transport will track the retrieved result package in the specified session context. If the session context is destroyed, the result package will be closed and resources will be freed. When a session context is specified, it is important for the calling application to close the result package when it is done using it. If the result package is not closed, it will remain in the session context and garbage collection will not occur until the session context is destroyed. The result package should be closed to ensure that it is removed from the session context.

  Parameters:
    `url` - The URL. If publishing, the URL identifies the collection where the result package will be published. If retrieving an existing result package, this URL identifies the collection/result package to retrieve.
    `domain` - The authentication domain. This can be `null`.
    `sessionContext` - The session context. This can be `null`.
  Throws:
    `TransportException` - If an error occurs initializing the transport.

### getDAVTransport

    public DAVTransportInterface getDAVTransport(java.lang.String url,
                                                 java.lang.String username,
                                                 java.lang.String password,
                                                 LoggerInterface logger,
                                                 SessionContextInterface sessionContext)
                                          throws TransportException

  Deprecated. Use `getDAVTransportWithCredentials(String, String, String, SessionContextInterface)`

  Creates an instance of the WebDAV transport. The WebDAV transport provides a mechanism for publishing a result package to a webDAV server, and for retrieving a result package from a webDAV server. The specified username and password will be used when binding to the webDAV server.

  Session-based applications can specify a session context. When a result package is retrieved from a WebDAV server, the WebDAV transport will track the retrieved result package in the specified session context. If the session context is destroyed, the result package will be closed and resources will be freed. When a session context is specified, it is important for the calling application to close the result package when it is done using it. If the result package is not closed, it will remain in the session context and garbage collection will not occur until the session context is destroyed. The result package should be closed to ensure that it is removed from the session context.

  By default, the publish services will not provide any logging. The publish services will utilize logging only if a session context or a logger is specified. If a logger is specified, it will take precedence and will be used for logging publish activities. If a session context is specified but the logger is `null`, the logger contained within the session context will be used for logging purposes.

  Parameters:
    `url` - The URL. If publishing, the URL identifies the collection where the result package will be published. If retrieving an existing result package, this URL identifies the collection/result package to retrieve.
    `username` - The user name. This can be `null`.
    `password` - The password. This can be `null`.
    `logger` - The logger to use for logging publish activity. This can be `null`.
    `sessionContext` - The session context. This can be `null`.
  Throws:
    `TransportException` - If an error occurs initializing the transport.

### getDAVTransportWithCredentials

    public DAVTransportInterface getDAVTransportWithCredentials(java.lang.String url,
                                                                java.lang.String username,
                                                                java.lang.String password,
                                                                SessionContextInterface sessionContext)
                                                         throws TransportException

  Creates an instance of the WebDAV transport. The WebDAV transport provides a mechanism for publishing a result package to a webDAV server, and for retrieving a result package from a webDAV server. The specified username and password will be used when binding to the webDAV server.

  Session-based applications can specify a session context. When a result package is retrieved from a WebDAV server, the WebDAV transport will track the retrieved result package in the specified session context. If the session context is destroyed, the result package will be closed and resources will be freed. When a session context is specified, it is important for the calling application to close the result package when it is done using it. If the result package is not closed, it will remain in the session context and garbage collection will not occur until the session context is destroyed. The result package should be closed to ensure that it is removed from the session context.

  Parameters:
    `url` - The URL. If publishing, the URL identifies the collection where the result package will be published. If retrieving an existing result package, this URL identifies the collection/result package to retrieve.
    `username` - The user name. This can be `null`.
    `password` - The password. This can be `null`.
    `sessionContext` - The session context. This can be `null`.
  Throws:
    `TransportException` - If an error occurs initializing the transport.

### getDAVTransport

    public DAVTransportInterface getDAVTransport(ContentDestination content,
                                                 LoggerInterface logger,
                                                 SessionContextInterface sessionContext)
                                          throws TransportException

  Deprecated. Use `getDAVTransport(ContentDestination, SessionContextInterface)`

  Creates an instance of the WebDAV transport that can be used to publish a result package to a WebDAV server, and to retrieve a result package from a WebDAV server. This method is useful for applications that are managing (and publishing to) WebDAV subscribers ( `com.sas.services.information.metadata.SubscriberInterface`). The content destination of a subscriber identifies all the information needed to publish to WebDAV. It includes the relative path of the subscriber, the HTTP server, and the domain information.

  Session-based applications can specify a session context. If the WebDAV server identified by the ContentDestination is configured for user/password authentication, then the user context contained within the session context, along with the authentication domain, will be used to determine the credentials that will be used when binding to the webDAV server. If the WebDAV server identified by the ContentDestination is configured for metadata authentication, then a OTP will be generated when binding to the WebDAV Server.

  When a result package is retrieved from a WebDAV server, the WebDAV transport will track the retrieved result package in the specified session context. If the session context is destroyed, the result package will be closed and resources will be freed. When a session context is specified, it is important for the calling application to close the result package when it is done using it. If the result package is not closed, it will remain in the session context and garbage collection will not occur until the session context is destroyed. The result package should be closed to ensure that it is removed from the session context.

  By default, the publish services will not provide any logging. The publish services will utilize logging only if a session context or a logger is specified. If a logger is specified, it will take precedence and will be used for logging publish activities. If a session context is specified but the logger is `null`, the logger contained within the session context will be used for logging purposes.

  Parameters:
    `content` - The ContentDestination that identifies the WebDAV server information.
    `logger` - The logger to use for logging publish activity. This can be `null`.
    `sessionContext` - The session context. This can be `null`.
  Throws:
    `TransportException` - If an error occurs initializing the transport.

### getDAVTransport

    public DAVTransportInterface getDAVTransport(ContentDestination content,
                                                 SessionContextInterface sessionContext)
                                          throws TransportException

  Creates an instance of the WebDAV transport that can be used to publish a result package to a WebDAV server, and to retrieve a result package from a WebDAV server. This method is useful for applications that are managing (and publishing to) WebDAV subscribers (`com.sas.services.information.metadata.SubscriberInterface`). The content destination of a subscriber identifies all the information needed to publish to WebDAV. It includes the relative path of the subscriber, the HTTP server, and the domain information.

  Session-based applications can specify a session context. If the WebDAV server identified by the ContentDestination is configured for user/password authentication, then the user context contained within the session context, along with the authentication domain, will be used to determine the credentials that will be used when binding to the webDAV server. If the WebDAV server identified by the ContentDestination is configured for metadata authentication, then a OTP will be generated when binding to the WebDAV Server.

  When a result package is retrieved from a WebDAV server, the WebDAV transport will track the retrieved result package in the specified session context. If the session context is destroyed, the result package will be closed and resources will be freed. When a session context is specified, it is important for the calling application to close the result package when it is done using it. If the result package is not closed, it will remain in the session context and garbage collection will not occur until the session context is destroyed. The result package should be closed to ensure that it is removed from the session context.

  Parameters:
    `content` - The ContentDestination that identifies the WebDAV server information.
    `sessionContext` - The session context. This can be `null`.
  Throws:
    `TransportException` - If an error occurs initializing the transport.

### getRequesterTransport

    public RequesterTransportInterface getRequesterTransport(com.sas.iom.SAS.IResultPackage resultPackage,
                                                             LoggerInterface logger,
                                                             SessionContextInterface sessionContext)
                                                      throws TransportException

  Deprecated. Use `getRequesterTransport(IResultPackage, SessionContextInterface)`

  Creates an instance of the requester transport using an IResultPackage. Session-based applications can specify a session context. The logger contained within the session context will be used by the publishing services to log publishing activity. Additionally, when a result package is retrieved, the requester transport will track the retrieved result package in the specified session context. If the session context is destroyed, the result package will be closed and resources will be freed. When a session context is specified, it is important for the calling application to close the result package when it is done using it. If the result package is not closed, it will remain in the session context and garbage collection will not occur until the session context is destroyed. The result package should be closed to ensure that it is removed from the session context.

  By default, the publish services will not provide any logging. The publish services will utilize logging only if a session context or a logger is specified. If a logger is specified, it will take precedence and will be used for logging publish activities. If a session context is specified but the logger is `null`, the logger contained within the session context will be used for logging purposes.

  Parameters:
    `resultPackage` - the IResultPackage
    `logger` - The logger to use for logging publish activity. This can be `null`.
    `sessionContext` - The session context. This can be `null`
  Throws:
    `TransportException` - If an error occurs initializing the transport.

### getRequesterTransport

    public RequesterTransportInterface getRequesterTransport(com.sas.iom.SAS.IResultPackage resultPackage,
                                                             SessionContextInterface sessionContext)
                                                      throws TransportException

  Creates an instance of the requester transport using an IResultPackage. Session-based applications can specify a session context. The logger contained within the session context will be used by the publishing services to log publishing activity. Additionally, when a result package is retrieved, the requester transport will track the retrieved result package in the specified session context. If the session context is destroyed, the result package will be closed and resources will be freed. When a session context is specified, it is important for the calling application to close the result package when it is done using it. If the result package is not closed, it will remain in the session context and garbage collection will not occur until the session context is destroyed. The result package should be closed to ensure that it is removed from the session context.

  Parameters:
    `resultPackage` - the IResultPackage
    `sessionContext` - The session context. This can be `null`
  Throws:
    `TransportException` - If an error occurs initializing the transport.

### getRequesterTransport

    public RequesterTransportInterface getRequesterTransport(com.sas.iom.SAS.IWorkspace workspace,
                                                             java.lang.String transportInformation,
                                                             java.lang.String[][] properties,
                                                             LoggerInterface logger,
                                                             SessionContextInterface sessionContext)
                                                      throws TransportException

  Deprecated. use `getRequesterTransport(IWorkspace, String, String[][], SessionContextInterface)`

  Creates an instance of the requester transport using the transport information specified.

  The following is excerpted from the doc for IOM's BrowseResultPackage which is used by this method:

  The result package may be identified by physical path and filename, excluding any extension, or it may be an LDAP URL that contains the distinguished name of the sasArchive entry. If the LDAP server is secure, the LDAP URL may contain the bind distinguished name and password as shown in the document LDAP Channel Store Syntax. Or, "BINDDN" and "PASSWORD" may be specified as properties via the third (properties) parameter.

  Session-based applications can specify a session context. The logger contained within the session context will be used by the publishing services to log publishing activity. Additionally, when a result package is retrieved, the requester transport will track the retrieved result package in the specified session context. If the session context is destroyed, the result package will be closed and resources will be freed. When a session context is specified, it is important for the calling application to close the result package when it is done using it. If the result package is not closed, it will remain in the session context and garbage collection will not occur until the session context is destroyed. The result package should be closed to ensure that it is removed from the session context.

  By default, the publish services will not provide any logging. The publish services will utilize logging only if a session context or a logger is specified. If a logger is specified, it will take precedence and will be used for logging publish activities. If a session context is specified but the logger is `null`, the logger contained within the session context will be used for logging purposes.

  Parameters:
    `workspace` - the IWorkspace which provides the connection
    `transportInformation` - transport information
    `properties` - if needed by the transport; null otherwise.
    `logger` - The logger to use for logging publish activity. This can be `null`.
    `sessionContext` - The session context. This can be `null`
  Throws:
    `TransportException` - If an error occurs initializing the transport.

### getRequesterTransport

    public RequesterTransportInterface getRequesterTransport(com.sas.iom.SAS.IWorkspace workspace,
                                                             java.lang.String transportInformation,
                                                             java.lang.String[][] properties,
                                                             SessionContextInterface sessionContext)
                                                      throws TransportException

  Creates an instance of the requester transport using the transport information specified.

  The following is excerpted from the doc for IOM's BrowseResultPackage which is used by this method:

  The result package may be identified by physical path and filename, excluding any extension, or it may be an LDAP URL that contains the distinguished name of the sasArchive entry. If the LDAP server is secure, the LDAP URL may contain the bind distinguished name and password as shown in the document LDAP Channel Store Syntax. Or, "BINDDN" and "PASSWORD" may be specified as properties via the third (properties) parameter.

  Session-based applications can specify a session context. The logger contained within the session context will be used by the publishing services to log publishing activity. Additionally, when a result package is retrieved, the requester transport will track the retrieved result package in the specified session context. If the session context is destroyed, the result package will be closed and resources will be freed. When a session context is specified, it is important for the calling application to close the result package when it is done using it. If the result package is not closed, it will remain in the session context and garbage collection will not occur until the session context is destroyed. The result package should be closed to ensure that it is removed from the session context.

  Parameters:
    `workspace` - the IWorkspace which provides the connection
    `transportInformation` - transport information
    `properties` - if needed by the transport; null otherwise.
    `sessionContext` - The session context. This can be `null`
  Throws:
    `TransportException` - If an error occurs initializing the transport.

### getChannelTransport

    public ChannelTransportInterface getChannelTransport(ChannelInterface channel,
                                                         LoggerInterface logger,
                                                         SessionContextInterface sessionContext)
                                                  throws TransportException

  Deprecated. use `getChannelTransport(ChannelInterface, SessionContextInterface)`

  Creates an instance of the Channel transport. The Channel transport provides a mechanism for publishing a result package to a channel. A channel is a topic or identifier that acts as a conduit for related information. The channel carries the information from the publisher who created it, to the subscribers who want it. The package will be published to each subscriber of the channel. The delivery transport used to publish the package, will be determined by the subscriber's metadata.

  Session-based applications can specify a session context. The user context contained within the session context will be used to obtain the credentials that will be used when publishing the content to any WebDAV location.

  By default, the publish services will not provide any logging. The publish services will utilize logging only if a session context or a logger is specified. If a logger is specified, it will take precedence and will be used for logging publish activities. If a session context is specified but the logger is `null`, the logger contained within the session context will be used for logging purposes.

  Parameters:
    `channel` - The channel to publish to.
    `logger` - The logger to use for logging publish activity. This can be `null`.
    `sessionContext` - The session context.
  Throws:
    `TransportException` - If an error occurs initializing the transport.

### getChannelTransport

    public ChannelTransportInterface getChannelTransport(ChannelInterface channel,
                                                         SessionContextInterface sessionContext)
                                                  throws TransportException

  Creates an instance of the Channel transport. The Channel transport provides a mechanism for publishing a result package to a channel. A channel is a topic or identifier that acts as a conduit for related information. The channel carries the information from the publisher who created it, to the subscribers who want it. The package will be published to each subscriber of the channel. The delivery transport used to publish the package, will be determined by the subscriber's metadata.

  Session-based applications can specify a session context. The user context contained within the session context will be used to obtain the credentials that will be used when publishing the content to any WebDAV location.

  Parameters:
    `channel` - The channel to publish to.
    `sessionContext` - The session context.
  Throws:
    `TransportException` - If an error occurs initializing the transport.

*** This class provides Binary Compatibility only, not Source Compatibility ***

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Foundation |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.