Package org.osgi.service.io
Interface ConnectionFactory
-
public interface ConnectionFactory
A Connection Factory service is called by the implementation of the Connector Service to createjavax.microedition.io.Connection
objects which implement the scheme named byIO_SCHEME
. When aConnectorService.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 propertyIO_SCHEME
which matches the scheme. ThecreateConnection(String, int, boolean)
method of the selected Connection Factory will then be called to create the actualConnection
object.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
IO_SCHEME
Service property containing the scheme(s) for which this Connection Factory can createConnection
objects.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.microedition.io.Connection
createConnection(java.lang.String name, int mode, boolean timeouts)
Create a newConnection
object for the specified URI.
-
-
-
Field Detail
-
IO_SCHEME
static final java.lang.String IO_SCHEME
Service property containing the scheme(s) for which this Connection Factory can createConnection
objects. This property is of typeString[]
.- See Also:
- Constant Field Values
-
-
Method Detail
-
createConnection
javax.microedition.io.Connection createConnection(java.lang.String name, int mode, boolean timeouts) throws java.io.IOException
Create a newConnection
object for the specified URI.- Parameters:
name
- The full URI passed to theConnectorService.open
methodmode
- The mode parameter passed to theConnectorService.open
methodtimeouts
- The timeouts parameter passed to theConnectorService.open
method- Returns:
- A new
javax.microedition.io.Connection
object. - Throws:
java.io.IOException
- If ajavax.microedition.io.Connection
object cannot be created.
-
-