X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db%2Fsrc%2Forg%2Fsimantics%2Fdb%2FServerI.java;h=18592cc6db3cbaea23b4f0e0b48740fc8c245e8f;hp=cc202af3ac3653735f2350bc18732b1214b08b29;hb=e19c37f84fd1ce2d946578f7c05f3e45444ba67a;hpb=969bd23cab98a79ca9101af33334000879fb60c5 diff --git a/bundles/org.simantics.db/src/org/simantics/db/ServerI.java b/bundles/org.simantics.db/src/org/simantics/db/ServerI.java index cc202af3a..18592cc6d 100644 --- a/bundles/org.simantics.db/src/org/simantics/db/ServerI.java +++ b/bundles/org.simantics.db/src/org/simantics/db/ServerI.java @@ -1,72 +1,72 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 Association for Decentralized Information Management - * in Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.db; - -import org.simantics.db.exception.DatabaseException; - -public interface ServerI { - - /** - * Start the server. - * - * @throws DatabaseException - */ - void start() throws DatabaseException; - - /** - * Ask server to stop. Server has no obligation to stop. - * After this server is either running or not. - * You can not and should not make any assumptions on server behavior. - * Remember that server lifetime is not under our control. - * - * @throws DatabaseException if server did not receive our plead or had trouble responding. - */ - void stop() throws DatabaseException; - - /** - * Verify if the server is in active and usable state. - * - * @return true if the server is alive and responsive. - */ - boolean isActive() throws DatabaseException; - - /** - * Get the server address. Can be used with {@link Driver#getSession()} and {@link Driver#getServer()} methods. - * - * @return address of the server as canonical string. - */ - public String getAddress() throws DatabaseException; - -// /** -// * @return -// * @throws DatabaseException -// * @deprecated Was used for getting server address. -// * Changed to string to remove dependency to ServerAddress structure. -// * Use Use the {@link #getAddress()} method instead. -// */ -// public ServerAddress getServerAddress() throws DatabaseException; - - /** - * Execute server command. - * - * @return command output. - */ - - public String execute(String command) throws DatabaseException; - - /** - * Execute server command and disconnect after command has been executed. - * - * @return command output. - */ - public String executeAndDisconnect(String command) throws DatabaseException; -} +/******************************************************************************* + * Copyright (c) 2007, 2010 Association for Decentralized Information Management + * in Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.db; + +import org.simantics.db.exception.DatabaseException; + +public interface ServerI { + + /** + * Start the server. + * + * @throws DatabaseException + */ + void start() throws DatabaseException; + + /** + * Ask server to stop. Server has no obligation to stop. + * After this server is either running or not. + * You can not and should not make any assumptions on server behavior. + * Remember that server lifetime is not under our control. + * + * @throws DatabaseException if server did not receive our plead or had trouble responding. + */ + void stop() throws DatabaseException; + + /** + * Verify if the server is in active and usable state. + * + * @return true if the server is alive and responsive. + */ + boolean isActive() throws DatabaseException; + + /** + * Get the server address. Can be used with {@link Driver#getSession()} and {@link Driver#getServer()} methods. + * + * @return address of the server as canonical string. + */ + public String getAddress() throws DatabaseException; + +// /** +// * @return +// * @throws DatabaseException +// * @deprecated Was used for getting server address. +// * Changed to string to remove dependency to ServerAddress structure. +// * Use Use the {@link #getAddress()} method instead. +// */ +// public ServerAddress getServerAddress() throws DatabaseException; + + /** + * Execute server command. + * + * @return command output. + */ + + public String execute(String command) throws DatabaseException; + + /** + * Execute server command and disconnect after command has been executed. + * + * @return command output. + */ + public String executeAndDisconnect(String command) throws DatabaseException; +}