Skip to content

Commit

Permalink
Remove redundant abstract keyword from interface
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejlach committed Jul 14, 2015
1 parent 3672e61 commit 4ffbdbb
Showing 1 changed file with 38 additions and 38 deletions.
76 changes: 38 additions & 38 deletions src/main/java/com/exxeleron/qjava/QConnection.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/**
* Copyright (c) 2011-2014 Exxeleron GmbH
*
*
* 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.
Expand All @@ -20,14 +20,14 @@

/**
* Interface for the q connector.
*
*
* @author dev123
*/
public interface QConnection {

/**
* Defines IPC message types.
*
*
* @author dev123
*/
public static enum MessageType {
Expand All @@ -37,14 +37,14 @@ public static enum MessageType {

/**
* Factory method for creating enum based on IPC message byte.
*
*
* @param i
* byte indicating message type
* @return {@link MessageType} matching the byte
*
*
* @throws IllegalArgumentException
*/
public static MessageType getMessageType( byte i ) {
public static MessageType getMessageType( final byte i ) {
switch ( i ) {
case 0:
return ASYNC;
Expand All @@ -60,41 +60,41 @@ public static MessageType getMessageType( byte i ) {

/**
* Initializes connection with the remote q service.
*
*
* @throws IOException
* @throws UnknownHostException
* @throws QException
*/
public abstract void open() throws IOException, QException;
public void open() throws IOException, QException;

/**
* Closes connection with the remote q service.
*
*
* @throws IOException
*/
public abstract void close() throws IOException;
public void close() throws IOException;

/**
* Reinitializes connection with the remote q service.
*
*
* @throws IOException
* @throws UnknownHostException
* @throws QException
*/
public abstract void reset() throws IOException, QException;
public void reset() throws IOException, QException;

/**
* Check whether connection with the remote q host has been established. Note that this function doesn't check
* whether the connection is still active. One has to use a heartbeat mechanism in order to check whether the
* connection is still active.
*
*
* @return <code>true</code> if connection with remote host is established, <code>false</code> otherwise
*/
public abstract boolean isConnected();
public boolean isConnected();

/**
* Executes a synchronous query against the remote q service.
*
*
* @param query
* Query to be executed
* @param parameters
Expand All @@ -103,23 +103,23 @@ public static MessageType getMessageType( byte i ) {
* @throws QException
* @throws IOException
*/
public abstract Object sync( String query, Object... parameters ) throws QException, IOException;
public Object sync( String query, Object... parameters ) throws QException, IOException;

/**
* Executes an asynchronous query against the remote q service.
*
*
* @param query
* Query to be executed
* @param parameters
* Additional parameters
* @throws QException
* @throws IOException
*/
public abstract void async( String query, Object... parameters ) throws QException, IOException;
public void async( String query, Object... parameters ) throws QException, IOException;

/**
* Reads next message from the remote q service.
*
*
* @param dataOnly
* if <code>true</code> returns only data part of the message, if <code>false</code> retuns data and
* message meta-information encapsulated in QMessage
Expand All @@ -129,21 +129,21 @@ public static MessageType getMessageType( byte i ) {
* @throws IOException
* @throws QException
*/
public abstract Object receive( boolean dataOnly, boolean raw ) throws IOException, QException;
public Object receive( boolean dataOnly, boolean raw ) throws IOException, QException;

/**
* Reads next message from the remote q service.
*
*
* @return deserialized response from the remote q service
* @throws IOException
* @throws QException
*/
public abstract Object receive() throws IOException, QException;
public Object receive() throws IOException, QException;

/**
* Executes a query against the remote q service. Result of the query has to be retrieved by calling a receive
* method.
*
*
* @param msgType
* Indicates whether message should be synchronous or asynchronous
* @param query
Expand All @@ -154,48 +154,48 @@ public static MessageType getMessageType( byte i ) {
* @throws QException
* @throws IOException
*/
public abstract int query( final MessageType msgType, final String query, final Object... parameters ) throws QException, IOException;
public int query( final MessageType msgType, final String query, final Object... parameters ) throws QException, IOException;

/**
* Returns the host of a remote q service.
*
*
* @return host of remote a q service
*/
public abstract String getHost();
public String getHost();

/**
* Returns the port of a remote q service.
*
*
* @return post of remote a q service
*/
public abstract int getPort();
public int getPort();

/**
* Returns username for remote authorization.
*
*
* @return username for remote authorization
*/
public abstract String getUsername();
public String getUsername();

/**
* Returns password for remote authorization.
*
*
* @return password for remote authorization
*/
public abstract String getPassword();
public String getPassword();

/**
* Returns encoding used for serialization/deserialization of string objects.
*
*
* @return encoding used for serialization/deserialization of string objects
*/
public abstract String getEncoding();
public String getEncoding();

/**
* Retrives version of the IPC protocol for an established connection.
*
*
* @return protocol version
*/
public abstract int getProtocolVersion();
public int getProtocolVersion();

}

0 comments on commit 4ffbdbb

Please sign in to comment.