public final class ServiceManager
extends java.lang.Object
ServiceManager
はJNLPサービスを検索するためのstaticメソッドを提供します。このクラスはfinalであり、インスタンス化できません。
要求は、ServiceManagerStub
オブジェクトに委譲されます。このオブジェクトは、JNLPクライアントによりsetServiceManagerStub
メソッドを使って起動時に設定されなければいけません。
ServiceManagerStub
修飾子と型 | メソッドと説明 |
---|---|
static java.lang.String[] |
getServiceNames()
JNLPクライアントにより実装されたすべてのサービスの名前を返します。
|
static java.lang.Object |
lookup(java.lang.String name)
指定の名前でJNLPクライアントにサービスを要求します。
|
static void |
setServiceManagerStub(ServiceManagerStub stub)
すべての
lookup 要求とgetServiceNames 要求が委譲されるオブジェクトを設定します。 |
public static java.lang.Object lookup(java.lang.String name) throws UnavailableServiceException
name
- 検索するサービスの名前。null
が返されることはない。かわりに例外がスローされる。UnavailableServiceException
- サービスを利用できない場合、またはname
がnullの場合。public static java.lang.String[] getServiceNames()
public static void setServiceManagerStub(ServiceManagerStub stub)
lookup
要求とgetServiceNames
要求が委譲されるオブジェクトを設定します。スタブがすでに設定されている場合、setServiceManagerStub
の呼出しは無視されます。
このメソッドは、JNLPクライアントにより1回だけ呼び出されます。起動されたアプリケーションにより呼び出されることはありません。
stub
- 委譲先のServiceManagerStubオブジェクトCopyright © 1998, 2020, Oracle and/or its affiliates. All rights reserved.