com.ibasco.agql.core.ContextProperties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of agql-lib-core Show documentation
Show all versions of agql-lib-core Show documentation
The core library. Required by all agql modules.
The newest version!
/*
* Copyright (c) 2022 Asynchronous Game Query Library
*
* 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.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.ibasco.agql.core;
import java.net.InetSocketAddress;
import java.util.concurrent.CompletableFuture;
/**
* ContextProperties interface.
*
* @author Rafael Luis Ibasco
*/
public interface ContextProperties {
/**
* autoRelease.
*
* @return a boolean
*/
boolean autoRelease();
/**
* autoRelease.
*
* @param autoRelease
* a boolean
*/
void autoRelease(boolean autoRelease);
/**
* localAddress.
*
* @return a {@link java.net.InetSocketAddress} object
*/
InetSocketAddress localAddress();
/**
* remoteAddress.
*
* @return a {@link java.net.InetSocketAddress} object
*/
InetSocketAddress remoteAddress();
/**
* request.
*
* @param
* a V class
*
* @return a V object
*/
V request();
/**
* request.
*
* @param request
* a {@link com.ibasco.agql.core.AbstractRequest} object
*/
void request(AbstractRequest request);
/**
* response.
*
* @param
* a V class
*
* @return a V object
*/
V response();
/**
* error.
*
* @return a {@link java.lang.Throwable} object
*/
Throwable error();
/**
* writeInProgress.
*
* @return a boolean
*/
boolean writeInProgress();
/**
* writeDone.
*
* @return a boolean
*/
boolean writeDone();
/**
* writeInError.
*
* @return a boolean
*/
boolean writeInError();
/**
* beginWrite.
*
* @return a {@link java.util.concurrent.CompletableFuture} object
*/
CompletableFuture beginWrite();
/**
* endWrite.
*
* @return a {@link java.util.concurrent.CompletableFuture} object
*/
CompletableFuture endWrite();
/**
* endWrite.
*
* @param error
* a {@link java.lang.Throwable} object
*
* @return a {@link java.util.concurrent.CompletableFuture} object
*/
CompletableFuture endWrite(Throwable error);
/**
* envelope.
*
* @param
* a A class
*
* @return a {@link com.ibasco.agql.core.Envelope} object
*/
Envelope envelope();
/**
* responsePromise.
*
* @param
* a V class
*
* @return a {@link java.util.concurrent.CompletableFuture} object
*/
CompletableFuture responsePromise();
/**
* Reset context properties. This should re-initialize the response and write promises, clear error
*/
void reset();
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy