Package org.osgi.service.io
Interface ConnectionFactory
-
public interface ConnectionFactoryA Connection Factory service is called by the implementation of the Connector Service to createjavax.microedition.io.Connectionobjects which implement the scheme named byIO_SCHEME. When aConnectorService.openmethod 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_SCHEMEwhich matches the scheme. ThecreateConnection(String, int, boolean)method of the selected Connection Factory will then be called to create the actualConnectionobject.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringIO_SCHEMEService property containing the scheme(s) for which this Connection Factory can createConnectionobjects.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.microedition.io.ConnectioncreateConnection(java.lang.String name, int mode, boolean timeouts)Create a newConnectionobject 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 createConnectionobjects. 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.IOExceptionCreate 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:
java.io.IOException- If ajavax.microedition.io.Connectionobject cannot be created.
-
-