OracleAS Syndication Services API Reference
10g (9.0.4)

Part No. B10399-01

oracle.syndicate.client
Class SyndicateConnectionFactory

java.lang.Object
  |
  +--oracle.syndicate.client.SyndicateConnectionFactory

public class SyndicateConnectionFactory
extends java.lang.Object

Entry point for all Oracle Syndication Services client APIs defines APIs fro creating SyndicateConnection instances which defines the necessary methods to access the server. Syndication clients are generally stateful as they may need to keep track of the subscriptions created and their state. Implementation of the SyndicateClientStateHandler interface can be supplied upon SyndicateConnection creation to maintain the client state.

The most common way to create a SyndicateConnection would be the following:

SyndicateConnectionFactory  scf = SyndicateConnectionFactory.getInstance();
SyndicateCientStateHandler scsh = scf.getDefaultSyndicateClientStateHandler("synd_state.xml");
SyndicateConnection sc = scf.createSyndicateConnection("http://my.syndication.com/syndserver/server", 
"myusername",
"mypassword", 
scsh);
Since:
release specific (what release of product did this appear in)

Method Summary
 SyndicateConnection createSyndicateConnection(java.lang.String syndEndPoint, java.lang.String username, java.lang.String password)
          Creates a new connection requiring HTTP Basic/Digest Authentication to establish a session with the server.
 SyndicateConnection createSyndicateConnection(java.lang.String syndEndPoint, java.lang.String username, java.lang.String password, SyndicateClientStateHandler sh)
          Creates a new connection requiring HTTP Basic/Digest Authentication to establish a session with the server.
 SyndicateConnection createSyndicateConnection(SyndicateSubscriber subscriber, java.lang.String syndEndPoint)
          Creates a new connection which requires no authentication.
 SyndicateConnection createSyndicateConnection(SyndicateSubscriber subscriber, java.lang.String syndEndPoint, SyndicateClientStateHandler scsh)
          Creates a new connection with the no authentication.
 SyndicateClientStateHandler getDefaultSyndicateClientStateHandler(java.lang.String filename)
          Create a default SyndicateClientStateHandler to be used.
static SyndicateConnectionFactory getInstance()
          Returns the SyndicateConnectionFactory instance.
 java.lang.String getProxyHost()
          Returns the host name of the HTTP proxy used for new connections.
 int getProxyPort()
          Returns the port of the HTTP proxy used for new connections.
 oracle.security.ssl.OracleSSLCredential getSSLCredential()
          Returns the SSLCredential used new SyndicateConnection created by this factory.
 int getTimeout()
          Get the transport read timeout.
 void setProxyServer(java.lang.String host, int iPort)
          Set proxy the HTTP proxy host for all the connections created by this factory.
 void setSSLCredential(oracle.security.ssl.OracleSSLCredential osslc)
          Sets the OracleSSLCredential object for use in SSL connections.
 void setTimeout(int iTimeout)
          Set the timeout value new SyndicateConnections created by this factory.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Method Detail

getInstance

public static SyndicateConnectionFactory getInstance()
Returns the SyndicateConnectionFactory instance.

setProxyServer

public void setProxyServer(java.lang.String host,
                           int iPort)
Set proxy the HTTP proxy host for all the connections created by this factory. To be called before creating a connection.
Parameters:
host - the transport proxy host or null if no proxy.

getProxyHost

public java.lang.String getProxyHost()
Returns the host name of the HTTP proxy used for new connections.
Returns:
the transport proxy host or null if no proxy.

getProxyPort

public int getProxyPort()
Returns the port of the HTTP proxy used for new connections.
Returns:
the transport proxy port. Invalid if getProxyHost() returns null.

setTimeout

public void setTimeout(int iTimeout)
Set the timeout value new SyndicateConnections created by this factory. To be called before opening a connection.
Parameters:
timeout - the amount of time, in ms, to block on reading data. A zero value indicates an infinite timeout.

getTimeout

public int getTimeout()
Get the transport read timeout.
Returns:
the amount of time, in ms, to block on reading data.

getSSLCredential

public oracle.security.ssl.OracleSSLCredential getSSLCredential()
Returns the SSLCredential used new SyndicateConnection created by this factory.

setSSLCredential

public void setSSLCredential(oracle.security.ssl.OracleSSLCredential osslc)
Sets the OracleSSLCredential object for use in SSL connections. To be called before opening a connection.
Parameters:
sslCredential - the credential object that will be used for the connection.

createSyndicateConnection

public SyndicateConnection createSyndicateConnection(SyndicateSubscriber subscriber,
                                                     java.lang.String syndEndPoint)
                                              throws SyndicateException
Creates a new connection which requires no authentication.
Parameters:
subscriber, - structure containing subscriber ID
syndEndPoint, - URL of the syndication server

createSyndicateConnection

public SyndicateConnection createSyndicateConnection(SyndicateSubscriber subscriber,
                                                     java.lang.String syndEndPoint,
SyndicateClientStateHandler scsh)
                                              throws SyndicateException
Creates a new connection with the no authentication. A state handler is passed to persist the subscription states.
Parameters:
subscriber, - structure containing subscriber ID
syndEndPoint, - URL of the syndication server
sh, - state handler to be used for pesrsistency of suubscription info

createSyndicateConnection

public SyndicateConnection createSyndicateConnection(java.lang.String syndEndPoint,
                                                     java.lang.String username,
                                                     java.lang.String password,
SyndicateClientStateHandler sh)
                                              throws SyndicateException
Creates a new connection requiring HTTP Basic/Digest Authentication to establish a session with the server. A state handler is passed to persist the subscription states.
Parameters:
syndEndPoint, - URL of the syndication server
username - to be used for HTTP Basic/Digest authentication
password - to be used for HTTP Basic/Digest authentication
sh - state handler to be used for persistency of suubscription info

createSyndicateConnection

public SyndicateConnection createSyndicateConnection(java.lang.String syndEndPoint,
                                                     java.lang.String username,
                                                     java.lang.String password)
                                              throws SyndicateException
Creates a new connection requiring HTTP Basic/Digest Authentication to establish a session with the server. A state handler is passed to persist the subscription states/info.
Parameters:
syndEndPoint, - URL of the syndication server
username - to be used for HTTP Basic/Digest authentication
password - to be used for HTTP Basic/Digest authentication

getDefaultSyndicateClientStateHandler

public SyndicateClientStateHandler getDefaultSyndicateClientStateHandler(java.lang.String filename)
                                                                  throws SyndicateClientException
Create a default SyndicateClientStateHandler to be used. By default the returned state handler will be the ( XMLSyndicateClientStateHandler which will store the client state information to an the XML file whose name is supplied.

Copyright © 2001, 2003, Oracle. All rights reserved.

Copyright © 2001, 2003, Oracle. All rights reserved.