Class AsteriaClient

java.lang.Object
com.infoteria.asteria.flowengine2.thinclient.AsteriaClient
Direct Known Subclasses:
FlowAdminClient, FlowDeployClient, FlowExecuteClient

public abstract class AsteriaClient extends Object
外部のJavaプログラムからフローサービスを操作するためのクライアントクラスです。
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    別のASTERIAクライアントから接続先情報とログイン状態を引き継いでクライアントを作成します。
    ASTERIAサーバーのURLを指定してクライアントを作成します。
    特に変更していない場合、URLは「http://<SERVERNAME>:21381/flow-rpc」となります。
    AsteriaClient(String server, int port)
    ASTERIAサーバーのサーバー名とポート番号を指定してクライアントを作成します。
  • Method Summary

    Modifier and Type
    Method
    Description
    login(String username, String password)
    ログインします。 セッションのライフタイムは30分になります。
    login(String username, String password, long lifetime)
    ログインします。
    boolean
    ログアウトします。
    boolean
    サーバーからセッションを削除します。
    void
    SSLSocketFactoryを設定します。

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • _sessionId

      protected String _sessionId
  • Constructor Details

    • AsteriaClient

      public AsteriaClient(String url) throws MalformedURLException
      ASTERIAサーバーのURLを指定してクライアントを作成します。
      特に変更していない場合、URLは「http://<SERVERNAME>:21381/flow-rpc」となります。
      Throws:
      MalformedURLException
    • AsteriaClient

      public AsteriaClient(String server, int port) throws MalformedURLException
      ASTERIAサーバーのサーバー名とポート番号を指定してクライアントを作成します。
      Parameters:
      server - サーバー名またはIPアドレス
      port - ポート番号
      Throws:
      MalformedURLException
    • AsteriaClient

      public AsteriaClient(AsteriaClient client)
      別のASTERIAクライアントから接続先情報とログイン状態を引き継いでクライアントを作成します。
      Parameters:
      client - ログイン済みのAsteriaClient
  • Method Details

    • login

      public String login(String username, String password) throws FlowClientException
      ログインします。 セッションのライフタイムは30分になります。
      Parameters:
      username - ドメインからのフルユーザ名
      password - パスワード
      Returns:
      セッションID
      Throws:
      FlowClientException
    • login

      public String login(String username, String password, long lifetime) throws FlowClientException
      ログインします。
      Parameters:
      username - ドメインからのフルユーザ名
      password - パスワード
      lifetime - セッションライフタイム
      Returns:
      セッションID
      Throws:
      FlowClientException
    • logout

      public boolean logout() throws FlowClientException
      ログアウトします。
      Returns:
      ログアウトに成功した場合(サーバーにログインセッションが存在しそれが削除された場合)はtrue
      Throws:
      FlowClientException
    • releaseSession

      public boolean releaseSession(String sessionid) throws FlowClientException
      サーバーからセッションを削除します。
      Parameters:
      sessionid - セッションID
      Returns:
      セッション削除に成功した場合はtrue
      Throws:
      FlowClientException
    • setSSLSocketFactory

      public void setSSLSocketFactory(SSLSocketFactory factory)
      SSLSocketFactoryを設定します。

      SSL通信のためのSSLSocketFactoryを設定します。URLに"https:"が指定された場合、 このファクトリを使用してソケットを生成します。
      設定するSSLSocketFactoryは初期化されている必要があります。
      このメソッドを実行していない場合は、SSLContext.getDefault().getSocketFactory()で取得されるSocketFactoryが設定されます。