Package org.osgi.service.io
Interface ConnectionFactory
public interface ConnectionFactory
A Connection Factory service is called by the implementation of the Connector
Service to create
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.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionjavax.microedition.io.ConnectioncreateConnection(String name, int mode, boolean timeouts) Create a newConnectionobject for the specified URI.
-
Field Details
-
IO_SCHEME
Service property containing the scheme(s) for which this Connection Factory can createConnectionobjects. This property is of typeString[].- See Also:
-
-
Method Details
-
createConnection
javax.microedition.io.Connection createConnection(String name, int mode, boolean timeouts) throws IOException Create a newConnectionobject for the specified URI.- Parameters:
name- The full URI passed to theConnectorService.openmethodmode- The mode parameter passed to theConnectorService.openmethodtimeouts- The timeouts parameter passed to theConnectorService.openmethod- Returns:
- A new
javax.microedition.io.Connectionobject. - Throws:
IOException- If ajavax.microedition.io.Connectionobject cannot be created.
-