UCF: the URL Connection Factory

There is one URL Connection Factory type per protocol, and they all implement this interface. This interface has two methods: one which returns the name of the protocol, in the form used in URLs, and one which creates URL Connection types.


This interface is defined in java, and is compiled with JMC. The C syntax is included in each method description, and is summarised below.

import netscape.url.URL;

public abstract interface UCF {
  public abstract String getProtocolName();
  public abstract UC createUC(URL url, NC nc) throws Exception;

Interface Methods

Inherited Methods

Although this interface does not inherit anything, note that all objects implementing this interface will inherit the usual JMC base methods.

C interface

#include "UCF.h"

const char *UCF_getProtocolName(UCF *self, JMCException **e);
UC *UCF_createUC(UCF *self, URL *url, NC *nc, JMCException **e);

/* methods inherited from base JMC object interface */
void *UCF_getInterface(UCF *self, JMCInterfaceID id, JMCException **e);
void UCF_addRef(UCF *self, JMCException **e);
void UCF_release(UCF *self, JMCException **e);
jint UCF_hashCode(UCF *self, JMCException **e);
void *UCF_clone(UCF *self, JMCException **e);
const char *UCF_toString(UCF *self, JMCException **e);
void UCF_finalize(UCF *self, JMCException **e);

Written by Frederick at 18:31 17.03.1997.