Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * Copyright (c) OSGi Alliance (2002, 2013). 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
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.

A Connection Factory service is called by the implementation of the Connector Service to create objects which implement the scheme named by IO_SCHEME. When a 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.

$Id: 9f6aae71e9b0b65afb94f94a8c0493a96d925558 $
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.

name The full URI passed to the method
mode The mode parameter passed to the method
timeouts The timeouts parameter passed to the method
A new object.
IOException If a object can not not be created.
	public Connection createConnection(String nameint modeboolean timeoutsthrows IOException;
New to GrepCode? Check out our FAQ X