public String getTransportName() { return transportIn.getName(); }
public String getTransportName() { return trpInDesc.getName(); }
public String getTransportName() { return trpInDesc.getName(); }
public String getTransportName() { return transportIn.getName(); }
public String getTransportName() { return trpInDesc.getName(); }
public String getTransportName() { return pttInDescription.getName(); }
public ServerConnFactoryBuilder(final TransportInDescription transportIn, final HttpHost host) { this.transportIn = transportIn; this.host = host; this.name = transportIn.getName().toUpperCase(Locale.US); }
public ListenerContextBuilder(final TransportInDescription transportIn) { this.transportIn = transportIn; this.name = transportIn.getName().toUpperCase(Locale.US); }
/** * Add an incoming transport description (i.e. receiver) to our configuration. * * @param transport TransportInDescription to add. * @throws AxisFault */ public void addTransportIn(TransportInDescription transport) throws AxisFault { if (transport.getReceiver() == null) { throw new AxisFault( "Transport Receiver can not be null for the transport " + transport.getName()); } transportsIn.put(transport.getName(), transport); }
/** * Add an incoming transport description (i.e. receiver) to our configuration. * * @param transport TransportInDescription to add. * @throws AxisFault */ public void addTransportIn(TransportInDescription transport) throws AxisFault { if (transport.getReceiver() == null) { throw new AxisFault( "Transport Receiver can not be null for the transport " + transport.getName()); } transportsIn.put(transport.getName(), transport); }
@Override public EndpointReference[] getEPRsForService(String serviceName, String ip) throws AxisFault { // we use our own URLs return this.config.getEPRsForAxisService(serviceName, transportInDescription.getName()); } }
private static String getDescriptionFor(ParameterInclude paramInclude) { if (paramInclude instanceof AxisService) { return "service '" + ((AxisService)paramInclude).getName() + "'"; } else if (paramInclude instanceof TransportInDescription) { return "transport receiver '" + ((TransportInDescription)paramInclude).getName() + "'"; } else if (paramInclude instanceof TransportOutDescription) { return "transport sender '" + ((TransportOutDescription)paramInclude).getName() + "'"; } else { return paramInclude.getClass().getName(); } } }
private static String getDescriptionFor(ParameterInclude paramInclude) { if (paramInclude instanceof AxisService) { return "service '" + ((AxisService)paramInclude).getName() + "'"; } else if (paramInclude instanceof TransportInDescription) { return "transport receiver '" + ((TransportInDescription)paramInclude).getName() + "'"; } else if (paramInclude instanceof TransportOutDescription) { return "transport sender '" + ((TransportOutDescription)paramInclude).getName() + "'"; } else { return paramInclude.getClass().getName(); } } }
public boolean matches(AxisService service) { return !service.getName().startsWith("__") // these are "private" services && BaseUtils.isUsingTransport(service, pttInDescription.getName()); } },
public void init(ConfigurationContext configurationContext, TransportInDescription transportInDescription) throws AxisFault { this.configurationContext = configurationContext; this.transportInDescription = transportInDescription; scheme = transportInDescription.getName(); if (!"http".equals(scheme) && !"https".equals(scheme)) { throw new AxisFault(AxisServletListener.class.getName() + " can only be used for http or https"); } Parameter param = transportInDescription.getParameter(PARAM_PORT); if (param != null) { try { port = Integer.parseInt((String) param.getValue()); } catch (NumberFormatException ex) { throw new AxisFault("Invalid port number"); } } else { port = -1; } }
/** * Pauses all Axis2 listeners which support this operation. */ public void pauseListeners() { if ((configurationContext != null) && (configurationContext.getAxisConfiguration() != null)) { Map<String, TransportInDescription> trpIns = configurationContext.getAxisConfiguration().getTransportsIn(); for (TransportInDescription trpIn : trpIns.values()) { TransportListener trpLst = trpIn.getReceiver(); if (trpLst instanceof ManagementSupport) { try { ((ManagementSupport) trpLst).pause(); } catch (AxisFault axisFault) { log.error(new StringBuilder("Error putting transport listener for: ") .append(trpIn.getName()).append(" into maintenence").toString()); } } } } }
public String[] getExposedTransports(String serviceId) throws AxisFault { AxisService axisService = getAxisConfig().getService(serviceId); if (!axisService.isEnableAllTransports()) { List exposedTransports = axisService.getExposedTransports(); return (String[]) exposedTransports.toArray(new String[exposedTransports.size()]); } else { HashMap transportsIn = getConfigContext().getAxisConfiguration() .getTransportsIn(); String[] transports = new String[transportsIn.size()]; int i = 0; for (Iterator transportsIter = transportsIn.values().iterator(); transportsIter.hasNext();) { TransportInDescription tiDesc = (TransportInDescription) transportsIter.next(); transports[i++] = tiDesc.getName(); } return transports; } }
void receive(MessageContext messageCtx) throws AxisFault { log.debug("MessageReceiver has been invoked"); final AxisMessage messageData; try { Assert.assertTrue(messageCtx.isServerSide()); TransportInDescription transportIn = messageCtx.getTransportIn(); Assert.assertNotNull("transportIn not set on message context", transportIn); Assert.assertEquals(context.getTransportName(), transportIn.getName()); Assert.assertEquals(context.getTransportName(), messageCtx.getIncomingTransportName()); for (MessageContextValidator validator : validators) { validator.validate(messageCtx, false); } messageData = new AxisMessage(messageCtx); } catch (Throwable ex) { support.putException(ex); return; } support.putMessage(null, messageData); }
public void disableTransportForService(AxisService service) { log.warn("Disabling the " + getTransportName() + " transport for the service " + service.getName() + ", because it is not configured properly for the service"); if (service.isEnableAllTransports()) { ArrayList<String> exposedTransports = new ArrayList<String>(); for(Object obj: cfgCtx.getAxisConfiguration().getTransportsIn().values()) { String transportName = ((TransportInDescription) obj).getName(); if (!transportName.equals(getTransportName())) { exposedTransports.add(transportName); } } service.setEnableAllTransports(false); service.setExposedTransports(exposedTransports); } else { service.removeExposedTransport(getTransportName()); } }
public void disableTransportForService(AxisService service) { log.warn("Disabling the " + getTransportName() + " transport for the service " + service.getName() + ", because it is not configured properly for the service"); if (service.isEnableAllTransports()) { ArrayList<String> exposedTransports = new ArrayList<String>(); for(Object obj: cfgCtx.getAxisConfiguration().getTransportsIn().values()) { String transportName = ((TransportInDescription) obj).getName(); if (!transportName.equals(getTransportName())) { exposedTransports.add(transportName); } } service.setEnableAllTransports(false); service.setExposedTransports(exposedTransports); } else { service.removeExposedTransport(getTransportName()); } }