/** * Check the next start tag is as expected. * @param streamReader The stream reader. * @param expected The expected qualified name. * @throws XMLStreamException For errors during parsing. */ public static void checkNextStartTag(final XMLStreamReader streamReader, final QName expected) throws XMLStreamException { skipToNextStartElement(streamReader) ; checkTag(streamReader, expected) ; }
public static <T extends Service> PrivilegedServiceFactory<T> getInstance(final Class<T> serviceClass) { return new PrivilegedServiceFactory<>(serviceClass); }
public static <T extends Service> ServiceAction<T> getInstance(final Class<T> serviceClass) { return new ServiceAction<>(serviceClass); }
/** * Write the attribute to the stream. * @param out The output stream. * @param attributeName The attribute name. * @param attributeValue The attribute value. * @throws XMLStreamException Thrown for errors during writing. */ public static void writeAttribute(final XMLStreamWriter out, final QName attributeName, final Object attributeValue) throws XMLStreamException { if (attributeValue instanceof QName) { writeAttribute(out, attributeName, (QName)attributeValue) ; } else { writeAttribute(out, attributeName, attributeValue.toString()) ; } }
/** * retrieve the inbound server message address properties attached to a message context * @param ctx the server message context * @return the inbound server message address properties */ public static MAP inboundMap(MessageContext ctx) { return PrivilegedMapBuilderFactory.getInstance().getBuilderInstance().inboundMap(ctx); }
/** * fetch a coordinator registration service unique to the current thread * @return */ private static synchronized RegistrationService getRegistrationService() { if (registrationService.get() == null) { registrationService.set(PrivilegedServiceFactory.getInstance(RegistrationService.class).getService()); } return registrationService.get(); }
public T getService() { final ServiceAction<T> serviceAction = ServiceAction.getInstance(serviceClass); if (System.getSecurityManager() == null) { return serviceAction.run(); } return AccessController.doPrivileged(serviceAction); }
public MAPBuilder getBuilderInstance() { final MapBuilderAction mapBuilderAction = MapBuilderAction.getInstance(); if (System.getSecurityManager() == null) { return mapBuilderAction.run(); } return AccessController.doPrivileged(mapBuilderAction); }
public ServiceRegistry getServiceRegistry() { final ServiceRegistryAction serviceRegistryAction = ServiceRegistryAction.getInstance(); if (System.getSecurityManager() == null) { return serviceRegistryAction.run(); } return AccessController.doPrivileged(serviceRegistryAction); }
/** * Check the next start tag is as expected. * @param streamReader The stream reader. * @param expected The expected qualified name. * @throws XMLStreamException For errors during parsing. */ public static void checkNextStartTag(final XMLStreamReader streamReader, final QName expected) throws XMLStreamException { skipToNextStartElement(streamReader) ; checkTag(streamReader, expected) ; }
/** * Write the attribute to the stream. * @param out The output stream. * @param attributeName The attribute name. * @param attributeValue The attribute value. * @throws XMLStreamException Thrown for errors during writing. */ public static void writeAttribute(final XMLStreamWriter out, final QName attributeName, final Object attributeValue) throws XMLStreamException { if (attributeValue instanceof QName) { writeAttribute(out, attributeName, (QName)attributeValue) ; } else { writeAttribute(out, attributeName, attributeValue.toString()) ; } }
/** * retrieve the outbound client message address properties attached to a message request map * @param ctx the client request properties map * @return the outbound client message address properties */ public static MAP outboundMap(Map<String, Object> ctx) { return PrivilegedMapBuilderFactory.getInstance().getBuilderInstance().outboundMap(ctx); }
/** * fetch a coordinator activation service unique to the current thread * @return */ private static synchronized ActivationService getActivationService() { if (activationService.get() == null) { activationService.set(PrivilegedServiceFactory.getInstance(ActivationService.class).getService()); } return activationService.get(); }
/** * Check the next start tag is as expected. * @param streamReader The stream reader. * @param expected The expected qualified name. * @throws XMLStreamException For errors during parsing. */ public static void checkNextStartTag(final XMLStreamReader streamReader, final QName expected) throws XMLStreamException { skipToNextStartElement(streamReader) ; checkTag(streamReader, expected) ; }
/** * Write the attribute to the stream. * @param out The output stream. * @param attributeName The attribute name. * @param attributeValue The attribute value. * @throws XMLStreamException Thrown for errors during writing. */ public static void writeAttribute(final XMLStreamWriter out, final QName attributeName, final Object attributeValue) throws XMLStreamException { if (attributeValue instanceof QName) { writeAttribute(out, attributeName, (QName)attributeValue) ; } else { writeAttribute(out, attributeName, attributeValue.toString()) ; } }
private static synchronized MAPEndpoint getNoneAddress() { if (noneAddress == null) { final MAPBuilder builder = PrivilegedMapBuilderFactory.getInstance().getBuilderInstance(); MAPConstants mapConstants = builder.newConstants(); String noneURI = mapConstants.getNoneURI(); noneAddress = builder.newEndpoint(noneURI); } return noneAddress; }
/** * Check the next start tag is as expected. * @param streamReader The stream reader. * @param expected The expected qualified name. * @throws XMLStreamException For errors during parsing. */ public static void checkNextStartTag(final XMLStreamReader streamReader, final QName expected) throws XMLStreamException { skipToNextStartElement(streamReader) ; checkTag(streamReader, expected) ; }
/** * Write the attribute to the stream. * @param out The output stream. * @param attributeName The attribute name. * @param attributeValue The attribute value. * @throws XMLStreamException Thrown for errors during writing. */ public static void writeAttribute(final XMLStreamWriter out, final QName attributeName, final Object attributeValue) throws XMLStreamException { if (attributeValue instanceof QName) { writeAttribute(out, attributeName, (QName)attributeValue) ; } else { writeAttribute(out, attributeName, attributeValue.toString()) ; } }
public static MAP outboundMap(Map<String, Object> ctx, String replyTo, String faultTo) { final MAPBuilder builder = PrivilegedMapBuilderFactory.getInstance().getBuilderInstance(); MAP map = builder.outboundMap(ctx); if (replyTo != null) { map.setReplyTo(builder.newEndpoint(replyTo)); } if (faultTo != null) { map.setFaultTo(builder.newEndpoint(faultTo)); } return map; }
public static void installFaultTo(MAP map, MAPEndpoint epReference, InstanceIdentifier identifier) { final MAPBuilder builder = PrivilegedMapBuilderFactory.getInstance().getBuilderInstance(); MAPEndpoint from = builder.newEndpoint(epReference.getAddress()); InstanceIdentifier.setEndpointInstanceIdentifier(from, identifier); map.setFaultTo(from); }