Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * #%L
   * =====================================================
   *   _____                _     ____  _   _       _   _
   *  |_   _|_ __ _   _ ___| |_  / __ \| | | | ___ | | | |
   *    | | | '__| | | / __| __|/ / _` | |_| |/ __|| |_| |
   *    | | | |  | |_| \__ \ |_| | (_| |  _  |\__ \|  _  |
   *    |_| |_|   \__,_|___/\__|\ \__,_|_| |_||___/|_| |_|
   *                             \____/
  * 
  * =====================================================
  * 
  * Hochschule Hannover
  * (University of Applied Sciences and Arts, Hannover)
  * Faculty IV, Dept. of Computer Science
  * Ricklinger Stadtweg 118, 30459 Hannover, Germany
  * 
  * Email: trust@f4-i.fh-hannover.de
  * Website: http://trust.f4.hs-hannover.de/
  * 
  * This file is part of ifmapj, version 2.2.1, implemented by the Trust@HsH
  * research group at the Hochschule Hannover.
  * %%
  * Copyright (C) 2010 - 2015 Trust@HsH
  * %%
  * 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.
  * #L%
  */
 package de.hshannover.f4.trust.ifmapj;
 
 
Entry class to do IF-MAP 2.0 communication using IfmapJ.

Author(s):
aw
 
 @SuppressWarnings("deprecation")
 public final class IfmapJ {
 
 	private IfmapJ() { }

Create a new de.hshannover.f4.trust.ifmapj.channel.SSRC object to operate on the given url using basic authentication.

Deprecated:
use createSsrc(BasicAuthConfig) instead
Parameters:
url the URL to connect to
user basic authentication user
pass basic authentication password
tms TrustManager instances to initialize the SSLContext with.
Returns:
a new de.hshannover.f4.trust.ifmapj.channel.SSRC that uses basic authentication
Throws:
IOException
 
 	public static SSRC createSsrc(String urlString userString passTrustManager[] tms)
 		return new SsrcImpl(urluserpasstms, 120*1000);
 	}

Create a new de.hshannover.f4.trust.ifmapj.channel.SSRC object to operate on the given configuration using basic authentication.

Parameters:
config the configuration parameter for the new SSRC
Returns:
a new de.hshannover.f4.trust.ifmapj.channel.SSRC that uses basic authentication
Throws:
de.hshannover.f4.trust.ifmapj.exception.InitializationException if the SSRC initialization fails
 
 	public static SSRC createSsrc(BasicAuthConfig config)
		TrustManager[] trustManagers = IfmapJHelper.getTrustManagers(
				IfmapJ.class.getResourceAsStream(config.trustStorePath),
				config.trustStorePassword);
		SSRC ssrc = new SsrcImpl(
				config.urlconfig.usernameconfig.passwordtrustManagersconfig.initialConnectionTimeout);
		if (config.threadSafe) {
			return new ThreadSafeSsrc(ssrc);
else {
			return ssrc;
		}
	}

Create a new de.hshannover.f4.trust.ifmapj.channel.SSRC object to operate on the given URL using certificate-based authentication. The keystore and truststore to be used have to be set using the java.lang.System.setProperty(java.lang.String,java.lang.String) method using the keys javax.net.ssl.keyStore, and javax.net.ssl.trustStore respectively.

Deprecated:
use createSsrc(CertAuthConfig) instead
Parameters:
url the URL to connect to
kms TrustManager instances to initialize the SSLContext with.
tms KeyManager instances to initialize the SSLContext with.
Returns:
a new de.hshannover.f4.trust.ifmapj.channel.SSRC that uses certificate-based authentication
Throws:
IOException
	public static SSRC createSsrc(String urlKeyManager[] kmsTrustManager[] tms)
		return new SsrcImpl(urlkmstms, 120 * 1000);
	}

Create a new de.hshannover.f4.trust.ifmapj.channel.SSRC object to operate on the given configuration using certificate based authentication.

Parameters:
config the configuration parameter for the new SSRC
Returns:
a new de.hshannover.f4.trust.ifmapj.channel.SSRC that uses certificate based authentication
Throws:
de.hshannover.f4.trust.ifmapj.exception.InitializationException if the SSRC initialization fails
	public static SSRC createSsrc(CertAuthConfig config)
		TrustManager[] trustManagers = IfmapJHelper.getTrustManagers(
				IfmapJ.class.getResourceAsStream(config.trustStorePath),
				config.trustStorePassword);
		KeyManager[] keyManagers = IfmapJHelper.getKeyManagers(
				IfmapJ.class.getResourceAsStream(config.keyStorePath),
				config.keyStorePassword);
		SSRC ssrc = new SsrcImpl(config.urlkeyManagerstrustManagersconfig.initialConnectionTimeout);
		if (config.threadSafe) {
			return new ThreadSafeSsrc(ssrc);
else {
			return ssrc;
		}
	}

Create a new de.hshannover.f4.trust.ifmapj.messages.RequestFactory object to create IF-MAP requests to be used with the methods provided by the de.hshannover.f4.trust.ifmapj.channel.SSRC class.

Deprecated:
Use de.hshannover.f4.trust.ifmapj.messages.Requests directly.
Returns:
a new de.hshannover.f4.trust.ifmapj.messages.RequestFactory that is used to create IF-MAP requests
		return Requests.getRequestFactory();
	}

Create a de.hshannover.f4.trust.ifmapj.identifier.IdentifierFactory object to create different types of Identifier implementations.

Deprecated:
Use de.hshannover.f4.trust.ifmapj.identifier.Identifiers directly.
Returns:
a new de.hshannover.f4.trust.ifmapj.identifier.IdentifierFactory that is used to create IF-MAP identifiers
		return Identifiers.getIdentifierFactory();
	}

Create a new de.hshannover.f4.trust.ifmapj.metadata.StandardIfmapMetadataFactory object to create standard metadata defined by IF-MAP 2.0.

	}

Create a de.hshannover.f4.trust.ifmapj21.ClockSkewDetector instance which can be used to synchronize the time with the MAPS.

Parameters:
ssrc the de.hshannover.f4.trust.ifmapj.channel.SSRC instance to be used for synchronization
dev the de.hshannover.f4.trust.ifmapj.identifier.Device used for time synchronization
Returns:
	public static ClockSkewDetector createClockSkewDetector(SSRC ssrcDevice dev) {
		return ClockSkewDetector.newInstance(ssrcdev);
	}

Create a de.hshannover.f4.trust.ifmapj.metadata.VendorSpecificMetadataFactory instance which can be used to create vendor specific metadata documents.

	}
New to GrepCode? Check out our FAQ X