Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright (c) OSGi Alliance (2002, 2011). All Rights Reserved.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.osgi.service.io;
import  javax.microedition.io.Connection;

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.

Version:
$Id: 8c03ed99afb1365db3fc74d8f662de1e812273ee $
public interface ConnectionFactory {
Service property containing the scheme(s) for which this Connection Factory can create Connection objects. This property is of type String[].
	public static final String	IO_SCHEME"io.scheme";

Create a new Connection object for the specified URI.

Parameters:
name The full URI passed to the ConnectorService.open method
mode The mode parameter passed to the ConnectorService.open method
timeouts The timeouts parameter passed to the ConnectorService.open method
Returns:
A new javax.microedition.io.Connection object.
Throws:
IOException If a javax.microedition.io.Connection object can not not be created.
	public Connection createConnection(String nameint modeboolean timeouts)
			throws IOException;
New to GrepCode? Check out our FAQ X