本文整理了Java中org.eclipse.jetty.client.HttpClient.isRunning()
方法的一些代码示例,展示了HttpClient.isRunning()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpClient.isRunning()
方法的具体详情如下:
包路径:org.eclipse.jetty.client.HttpClient
类名称:HttpClient
方法名:isRunning
暂无
代码示例来源:origin: spring-projects/spring-framework
@Override
public boolean isRunning() {
return this.httpClient.isRunning();
}
代码示例来源:origin: spring-projects/spring-framework
@Override
public void stop() {
try {
if (this.httpClient.isRunning()) {
this.httpClient.stop();
}
}
catch (Exception ex) {
throw new SockJsException("Failed to stop JettyXhrTransport", ex);
}
}
代码示例来源:origin: spring-projects/spring-framework
@Override
public void start() {
try {
if (!this.httpClient.isRunning()) {
this.httpClient.start();
}
}
catch (Exception ex) {
throw new SockJsException("Failed to start JettyXhrTransport", ex);
}
}
代码示例来源:origin: com.proofpoint.platform/http-client
@Override
public boolean isClosed()
{
return !httpClient.isRunning();
}
代码示例来源:origin: airlift/airlift
@Override
public boolean isClosed()
{
return !httpClient.isRunning();
}
代码示例来源:origin: org.springframework/spring-websocket
@Override
public boolean isRunning() {
return this.httpClient.isRunning();
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public boolean isRunning() {
return this.httpClient.isRunning();
}
代码示例来源:origin: allegro/hermes
private void stopClient(HttpClient client) {
if (client.isRunning()) {
try {
client.stop();
} catch (Exception ex) {
logger.error("Could not stop http client", ex);
}
}
}
}
代码示例来源:origin: org.eclipse.jetty.websocket/websocket-client
@Override
protected void doStart() throws Exception
{
Objects.requireNonNull(httpClient, "Provided HttpClient is null");
super.doStart();
if (!httpClient.isRunning())
throw new IllegalStateException("HttpClient is not running (did you forget to start it?): " + httpClient);
}
代码示例来源:origin: pl.allegro.tech.hermes/hermes-consumers
private void stopClient(HttpClient client) {
if (client.isRunning()) {
try {
client.stop();
} catch (Exception ex) {
logger.error("Could not stop http client", ex);
}
}
}
}
代码示例来源:origin: org.springframework/spring-websocket
@Override
public void start() {
try {
if (!this.httpClient.isRunning()) {
this.httpClient.start();
}
}
catch (Exception ex) {
throw new SockJsException("Failed to start JettyXhrTransport", ex);
}
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public void stop() {
try {
if (this.httpClient.isRunning()) {
this.httpClient.stop();
}
}
catch (Exception ex) {
throw new SockJsException("Failed to stop JettyXhrTransport", ex);
}
}
代码示例来源:origin: org.springframework/spring-websocket
@Override
public void stop() {
try {
if (this.httpClient.isRunning()) {
this.httpClient.stop();
}
}
catch (Exception ex) {
throw new SockJsException("Failed to stop JettyXhrTransport", ex);
}
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public void start() {
try {
if (!this.httpClient.isRunning()) {
this.httpClient.start();
}
}
catch (Exception ex) {
throw new SockJsException("Failed to start JettyXhrTransport", ex);
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
protected HttpDestination destinationFor(String scheme, String host, int port)
{
port = normalizePort(scheme, port);
String address = address(scheme, host, port);
HttpDestination destination = destinations.get(address);
if (destination == null)
{
destination = new HttpDestination(this, scheme, host, port);
if (isRunning())
{
HttpDestination existing = destinations.putIfAbsent(address, destination);
if (existing != null)
destination = existing;
else
LOG.debug("Created {}", destination);
if (!isRunning())
destinations.remove(address);
}
}
return destination;
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
protected HttpDestination destinationFor(String scheme, String host, int port)
{
port = normalizePort(scheme, port);
String address = address(scheme, host, port);
HttpDestination destination = destinations.get(address);
if (destination == null)
{
destination = new HttpDestination(this, scheme, host, port);
if (isRunning())
{
HttpDestination existing = destinations.putIfAbsent(address, destination);
if (existing != null)
destination = existing;
else
LOG.debug("Created {}", destination);
if (!isRunning())
destinations.remove(address);
}
}
return destination;
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
public void run()
{
while (isRunning())
{
_timeoutQ.tick(System.currentTimeMillis());
_idleTimeoutQ.tick(_timeoutQ.getNow());
try
{
Thread.sleep(200);
}
catch (InterruptedException ignored)
{
}
}
}
});
代码示例来源:origin: org.eclipse.jetty/jetty-client
@Override
public void onTimeoutExpired()
{
nextTimeout.set(Long.MAX_VALUE);
long now = System.nanoTime();
long nextExpiresAt = Long.MAX_VALUE;
// Check all queued exchanges for those that have expired
// and to determine when the next check must be.
for (HttpExchange exchange : exchanges)
{
HttpRequest request = exchange.getRequest();
long expiresAt = request.getTimeoutAt();
if (expiresAt == -1)
continue;
if (expiresAt <= now)
request.abort(new TimeoutException("Total timeout " + request.getTimeout() + " ms elapsed"));
else if (expiresAt < nextExpiresAt)
nextExpiresAt = expiresAt;
}
if (nextExpiresAt < Long.MAX_VALUE && client.isRunning())
schedule(nextExpiresAt);
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
public void release(Connection connection)
{
LOG.debug("{} released", connection);
if (client.isRunning())
{
boolean removed = activeConnections.remove(connection);
if (removed)
process(connection, false);
else
LOG.debug("{} explicit", connection);
}
else
{
LOG.debug("{} is stopped", client);
remove(connection);
connection.close();
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
public void release(Connection connection)
{
LOG.debug("{} released", connection);
if (client.isRunning())
{
boolean removed = activeConnections.remove(connection);
if (removed)
process(connection, false);
else
LOG.debug("{} explicit", connection);
}
else
{
LOG.debug("{} is stopped", client);
remove(connection);
connection.close();
}
}
内容来源于网络,如有侵权,请联系作者删除!