|
OSGi™ Service Platform Release 3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The Connector Service should be called to create and open javax.microedition.io.Connection objects. When an 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 method of the selected Connection Factory will then be called to create the actual Connection object.
If more than one Connection Factory service is registered for a particular scheme, the service with the highest ranking (as specified in its service.ranking property) is called. If there is a tie in ranking, the service with the lowest service ID (as specified in its service.id property), that is the service that was registered first, is called. This is the same algorithm used by BundleContext.getServiceReference.
Field Summary | |
static int |
READ
Read access mode. |
static int |
READ_WRITE
Read/Write access mode. |
static int |
WRITE
Write access mode. |
Method Summary | |
javax.microedition.io.Connection |
open(java.lang.String name)
Create and open a Connection object for the specified name. |
javax.microedition.io.Connection |
open(java.lang.String name,
int mode)
Create and open a Connection object for the specified name and access mode. |
javax.microedition.io.Connection |
open(java.lang.String name,
int mode,
boolean timeouts)
Create and open a Connection object for the specified name, access mode and timeouts. |
java.io.DataInputStream |
openDataInputStream(java.lang.String name)
Create and open a DataInputStream object for the specified name. |
java.io.DataOutputStream |
openDataOutputStream(java.lang.String name)
Create and open a DataOutputStream object for the specified name. |
java.io.InputStream |
openInputStream(java.lang.String name)
Create and open an InputStream object for the specified name. |
java.io.OutputStream |
openOutputStream(java.lang.String name)
Create and open an OutputStream object for the specified name. |
Field Detail |
public static final int READ
public static final int WRITE
public static final int READ_WRITE
Method Detail |
public javax.microedition.io.Connection open(java.lang.String name) throws java.io.IOException
name
- The URI for the connection.
java.lang.IllegalArgumentException
- If a parameter is invalid.
javax.microedition.io.ConnectionNotFoundException
- If the connection cannot be found.
java.io.IOException
- If some other kind of I/O error occurs.public javax.microedition.io.Connection open(java.lang.String name, int mode) throws java.io.IOException
name
- The URI for the connection.mode
- The access mode.
java.lang.IllegalArgumentException
- If a parameter is invalid.
javax.microedition.io.ConnectionNotFoundException
- If the connection cannot be found.
java.io.IOException
- If some other kind of I/O error occurs.public javax.microedition.io.Connection open(java.lang.String name, int mode, boolean timeouts) throws java.io.IOException
name
- The URI for the connection.mode
- The access mode.timeouts
- A flag to indicate that the caller wants timeout exceptions.
java.lang.IllegalArgumentException
- If a parameter is invalid.
javax.microedition.io.ConnectionNotFoundException
- If the connection cannot be found.
java.io.IOException
- If some other kind of I/O error occurs.public java.io.InputStream openInputStream(java.lang.String name) throws java.io.IOException
name
- The URI for the connection.
java.lang.IllegalArgumentException
- If a parameter is invalid.
javax.microedition.io.ConnectionNotFoundException
- If the connection cannot be found.
java.io.IOException
- If some other kind of I/O error occurs.public java.io.DataInputStream openDataInputStream(java.lang.String name) throws java.io.IOException
name
- The URI for the connection.
java.lang.IllegalArgumentException
- If a parameter is invalid.
javax.microedition.io.ConnectionNotFoundException
- If the connection cannot be found.
java.io.IOException
- If some other kind of I/O error occurs.public java.io.OutputStream openOutputStream(java.lang.String name) throws java.io.IOException
name
- The URI for the connection.
java.lang.IllegalArgumentException
- If a parameter is invalid.
javax.microedition.io.ConnectionNotFoundException
- If the connection cannot be found.
java.io.IOException
- If some other kind of I/O error occurs.public java.io.DataOutputStream openDataOutputStream(java.lang.String name) throws java.io.IOException
name
- The URI for the connection.
java.lang.IllegalArgumentException
- If a parameter is invalid.
javax.microedition.io.ConnectionNotFoundException
- If the connection cannot be found.
java.io.IOException
- If some other kind of I/O error occurs.
|
OSGi™ Service Platform Release 3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |