|
||||||||||
フレームあり フレームなし | ||||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--com.kddi.system.DeviceController
メーカー拡張デバイスの制御クラスを生成するためのクラスです。
拡張デバイス名deviceName を引数にgetInstance()
を呼び出すと、
別途規定するパッケージに属するdeviceName クラスを取得します。
指定したデバイスをサポートしていない場合、
DeviceNotSupportedException
を送出します。
deviceName クラスはアクセス可能なデフォルトコンストラクタを持つ必要があります。
コード例:
try { DeviceController controller = DeviceController.getInstance("KeyLockController"); controller.setAttribute(0, 1); // 属性を設定する // KeyLockControllerクラスにアクセスできる実装者は // setAttribute/getAttribute以外の追加メソッドを利用できる。 } catch (DeviceNotSupportedException e) { // 指定したデバイスをサポートしていない場合の処理 }
フィールドの概要 | |
protected static int |
baseID
デバイスIDの最小値 |
コンストラクタの概要 | |
protected |
DeviceController()
デフォルトコンストラクタ。 |
メソッドの概要 | |
abstract int |
getAttribute(int attr)
デバイス属性の取得。 |
protected int |
getAttributeNative(int id,
int attr)
デバイス属性の取得。 |
static DeviceController |
getInstance(java.lang.String deviceName)
拡張デバイス制御クラスのインスタンスを取得します。 |
abstract void |
setAttribute(int attr,
int value)
デバイス属性の設定。 |
protected void |
setAttributeNative(int id,
int attr,
int value)
デバイス属性の設定。 |
クラス java.lang.Object から継承したメソッド |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
protected static final int baseID
コンストラクタの詳細 |
protected DeviceController()
メソッドの詳細 |
public static final DeviceController getInstance(java.lang.String deviceName)
deviceName
- デバイス名(制御クラス名)。DeviceNotSupportedException
- 指定したデバイスをサポートしていない移動機で送出。public abstract void setAttribute(int attr, int value)
attr
- デバイスの属性。value
- 設定する値。public abstract int getAttribute(int attr)
attr
- デバイスの属性。protected final void setAttributeNative(int id, int attr, int value)
id
- デバイスID。baseID
以上の値。attr
- デバイスの属性。value
- 設定する値。java.lang.IllegalArgumentException
- id が baseID
未満の場合送出。SecurityException
- getInstance()
により生成されていないインスタンスで呼び出した場合送出。
protected final int getAttributeNative(int id, int attr)
id
- デバイスID。baseID
以上の値。attr
- デバイスの属性。java.lang.IllegalArgumentException
- id が baseID
未満の場合送出。SecurityException
- getInstance()
により生成されていないインスタンスで呼び出した場合送出。
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |