public void handle(final Message<JsonObject> msg) { Match curMatch = checkMatches(false, address, msg.body); if (curMatch.doesMatch) { if (curMatch.requiresAuth && sockAuths.get(sock) == null) { log.debug("Outbound message for address " + address + " rejected because auth is required and socket is not authed"); } else { checkAddAccceptedReplyAddress(msg.replyAddress); deliverMessage(sock, address, msg); } } else { log.debug("Outbound message for address " + address + " rejected because there is no inbound match"); } } };
private void logInternal(final String perms) { if ((perms != null) && log.isDebugEnabled()) { log.debug("You are running on Windows and POSIX style file permissions are not supported"); } }
@Override protected void initLoadBalancingPolicy(JsonObject loadBalancing) { // Recall super super.initLoadBalancingPolicy(loadBalancing); // If LB policy not set, try env vars if (loadBalancingPolicy == null) { String localDC = container.env().get(ENV_VAR_LOCAL_DC); if (!Strings.isNullOrEmpty(localDC)) { logger.debug("Using environment config for Local DC of " + localDC); loadBalancingPolicy = new DCAwareRoundRobinPolicy(localDC); } else { logger.debug("No environment configuration found for local DC"); } } }
@Override protected void initSeeds(JsonArray seeds) { // Recall super super.initSeeds(seeds); // If default, try env vars if (DEFAULT_SEEDS.equals(this.seeds)) { String envVarSeeds = container.env().get(ENV_VAR_SEEDS); if (!Strings.isNullOrEmpty(envVarSeeds)) { logger.debug("Using environment configuration of " + envVarSeeds); String[] seedsArray = envVarSeeds.split("\\|"); this.seeds = ImmutableList.copyOf(seedsArray); } } }
public void handle(AsyncResult<Boolean> res) { if (res.succeeded()) { if (res.result) { cacheAuthorisation(sessionID, sock); checkAndSend(send, address, jsonObject, sock, replyAddress); } else { log.debug("Inbound message for address " + address + " rejected because sessionID is not authorised"); } } else { log.error("Error in performing authorisation", res.exception); } } });
@Override public void init(JerseyConfigurator configurator) { baseUri = configurator.getBaseUri(); maxBodySize = configurator.getMaxBodySize(); applicationHandlerDelegate = configurator.getApplicationHandler(); logger.debug("DefaultJerseyHandler - initialized"); }
/** * Reconnects to the cluster with a new session. Any existing session is closed asynchronously. */ @Override public void reconnect() { logger.debug("Call to reconnect the session has been made"); Session oldSession = session; session = cluster.connect(); if (oldSession != null) { oldSession.closeAsync(); } metrics.afterReconnect(); }
@Override public void close() { logger.debug("Call to close the session has been made"); if (metrics != null) { metrics.close(); metrics = null; } if (cluster != null) { cluster.closeAsync().force(); cluster = null; session = null; } clusterBuilder = null; }
private void doSendOrPub(final boolean send, final SockJSSocket sock, final String address, final JsonObject jsonObject, final String replyAddress) { if (log.isDebugEnabled()) { log.debug("Received msg from client in bridge. address:" + address + " message:" + jsonObject.encode()); log.debug("Inbound message for address " + address + " rejected because it requires auth and sessionID is missing"); log.debug("Inbound message for address " + address + " rejected because there is no match");
private void cleanupConnection(ServerID theServerID, ConnectionHolder holder, boolean failed) { if (holder.timeoutID != -1) { vertx.cancelTimer(holder.timeoutID); } if (holder.pingTimeoutID != -1) { vertx.cancelTimer(holder.pingTimeoutID); } try { holder.socket.close(); } catch (Exception ignore) { } // The holder can be null or different if the target server is restarted with same serverid // before the cleanup for the previous one has been processed // So we only actually remove the entry if no new entry has been added if (connections.remove(theServerID, holder)) { log.debug("Cluster connection closed: " + theServerID + " holder " + holder); if (failed) { cleanSubsForServerID(theServerID); } } }
private void checkAndSend(boolean send, final String address, JsonObject jsonObject, final SockJSSocket sock, final String replyAddress) { final Handler<Message<JsonObject>> replyHandler; if (replyAddress != null) { replyHandler = new Handler<Message<JsonObject>>() { public void handle(Message<JsonObject> message) { // Note we don't check outbound matches for replies // Replies are always let through if the original message // was approved checkAddAccceptedReplyAddress(message.replyAddress); deliverMessage(sock, replyAddress, message); } }; } else { replyHandler = null; } if (log.isDebugEnabled()) { log.debug("Forwarding message to address " + address + " on event bus"); } if (send) { eb.send(address, jsonObject, replyHandler); } else { eb.publish(address, jsonObject); } }
depName != null ? depName : "deployment-" + UUID.randomUUID().toString(); log.debug("Deploying name : " + deploymentName + " main: " + main + " instances: " + instances);
log.debug("Deploying name : " + deploymentID + " main: " + theMain + " instances: " + instances);
protected void sendRequest(String scheme, String host, int port, String uri, Handler<HttpClientResponse> respHandler) { final String proxyHost = getProxyHost(); if (proxyHost != null) { // We use an absolute URI uri = scheme + "://" + host + ":" + port + uri; } HttpClientRequest req = client.get(uri, respHandler); if (proxyHost != null){ if (isUseDestinationHostHeaderForProxy()) { req.putHeader("host", host); } else { req.putHeader("host", proxyHost); } } else { req.putHeader("host", host); } if (getBasicAuth() != null) { log.debug("Using HTTP Basic Authorization"); req.putHeader("Authorization","Basic " + getBasicAuth()); } req.putHeader("user-agent", "Vert.x Module Installer"); req.end(); }