public interface ConnectionFactory
javax.microedition.io.Connection
objects which
implement the scheme named by IO_SCHEME
.
When a ConnectorService.open
method is called, the implementation of
the Connector Service will examine the specified name for a scheme. The
Connector Service will then look for a Connection Factory service which is
registered with the service property IO_SCHEME
which matches the
scheme. The createConnection(String, int, boolean)
method of the
selected Connection Factory will then be called to create the actual
Connection
object.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
IO_SCHEME
Service property containing the scheme(s) for which this Connection
Factory can create
Connection objects. |
Modifier and Type | Method and Description |
---|---|
javax.microedition.io.Connection |
createConnection(java.lang.String name,
int mode,
boolean timeouts)
Create a new
Connection object for the specified URI. |
static final java.lang.String IO_SCHEME
Connection
objects. This property is of type
String[]
.javax.microedition.io.Connection createConnection(java.lang.String name, int mode, boolean timeouts) throws java.io.IOException
Connection
object for the specified URI.name
- The full URI passed to the ConnectorService.open
methodmode
- The mode parameter passed to the
ConnectorService.open
methodtimeouts
- The timeouts parameter passed to the
ConnectorService.open
methodjavax.microedition.io.Connection
object.java.io.IOException
- If a javax.microedition.io.Connection
object
cannot be created.Copyright © OSGi Alliance (2000, 2018). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0