当前位置: 首页>>代码示例>>Scala>>正文


Scala Node类代码示例

本文整理汇总了Scala中org.w3c.dom.Node的典型用法代码示例。如果您正苦于以下问题:Scala Node类的具体用法?Scala Node怎么用?Scala Node使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Node类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Scala代码示例。

示例1: implicits

//设置package包名称以及导入依赖的类
package wookie.sqs

import com.amazonaws.AmazonServiceException
import org.w3c.dom.Node
import com.amazonaws.http.{ DefaultErrorResponseHandler, StaxResponseHandler }
import com.amazonaws.services.sqs.model.transform._
import com.amazonaws.transform.{ StandardErrorUnmarshaller, Unmarshaller, VoidStaxUnmarshaller }

import collection.JavaConversions._

object implicits {
  // gently stolen from sclasen/akka-aws
  implicit val unitU = new StaxResponseHandler(new VoidStaxUnmarshaller[Unit]())
  implicit val addPermissionM = new AddPermissionRequestMarshaller()
  implicit val changeMessageVisibilityBatchM = new ChangeMessageVisibilityBatchRequestMarshaller()
  implicit val changeMessageVisibilityBatchU = new StaxResponseHandler(ChangeMessageVisibilityBatchResultStaxUnmarshaller.getInstance)
  implicit val createQueueM = new CreateQueueRequestMarshaller()
  implicit val createQueueU = new StaxResponseHandler(CreateQueueResultStaxUnmarshaller.getInstance)
  implicit val deleteMessageBatchM = new DeleteMessageBatchRequestMarshaller()
  implicit val deleteMessageBatchU = new StaxResponseHandler(DeleteMessageBatchResultStaxUnmarshaller.getInstance)
  implicit val deleteMessageM = new DeleteMessageRequestMarshaller()
  implicit val deleteQueueM = new DeleteQueueRequestMarshaller()
  implicit val getQueueAttributesM = new GetQueueAttributesRequestMarshaller()
  implicit val getQueueAttributesU = new StaxResponseHandler(GetQueueAttributesResultStaxUnmarshaller.getInstance)
  implicit val getQueueUrlM = new GetQueueUrlRequestMarshaller()
  implicit val getQueueUrlU = new StaxResponseHandler(GetQueueUrlResultStaxUnmarshaller.getInstance)
  implicit val listDeadLetterSourceQueuesM = new ListDeadLetterSourceQueuesRequestMarshaller()
  implicit val listDeadLetterSourceQueuesU = new StaxResponseHandler(ListDeadLetterSourceQueuesResultStaxUnmarshaller.getInstance)
  implicit val listQueuesM = new ListQueuesRequestMarshaller()
  implicit val listQueuesU = new StaxResponseHandler(ListQueuesResultStaxUnmarshaller.getInstance)
  implicit val receiveMessageM = new ReceiveMessageRequestMarshaller()
  implicit val receiveMessageU = new StaxResponseHandler(ReceiveMessageResultStaxUnmarshaller.getInstance)
  implicit val removePermissionM = new RemovePermissionRequestMarshaller()
  implicit val sendMessageBatchM = new SendMessageBatchRequestMarshaller()
  implicit val sendMessageBatchU = new StaxResponseHandler(SendMessageBatchResultStaxUnmarshaller.getInstance)
  implicit val sendMessageM = new SendMessageRequestMarshaller()
  implicit val sendMessageU = new StaxResponseHandler(SendMessageResultStaxUnmarshaller.getInstance)
  implicit val setQueueAttributesM = new SetQueueAttributesRequestMarshaller()

  val sqsExceptionUnmarshallers = List[Unmarshaller[AmazonServiceException, Node]](
    new BatchEntryIdsNotDistinctExceptionUnmarshaller(),
    new BatchRequestTooLongExceptionUnmarshaller(),
    new EmptyBatchRequestExceptionUnmarshaller(),
    new InvalidAttributeNameExceptionUnmarshaller(),
    new InvalidBatchEntryIdExceptionUnmarshaller(),
    new InvalidIdFormatExceptionUnmarshaller(),
    new InvalidMessageContentsExceptionUnmarshaller(),
    new MessageNotInflightExceptionUnmarshaller(),
    new OverLimitExceptionUnmarshaller(),
    new QueueDeletedRecentlyExceptionUnmarshaller(),
    new QueueDoesNotExistExceptionUnmarshaller(),
    new QueueNameExistsExceptionUnmarshaller(),
    new ReceiptHandleIsInvalidExceptionUnmarshaller(),
    new TooManyEntriesInBatchRequestExceptionUnmarshaller(),
    new StandardErrorUnmarshaller()
  )

  implicit val errorResponseHandler = new DefaultErrorResponseHandler(sqsExceptionUnmarshallers)
} 
开发者ID:pepegar,项目名称:wookie,代码行数:60,代码来源:implicits.scala

示例2: ElasticLoadBalancingServiceContext

//设置package包名称以及导入依赖的类
package tanukkii.akkahttp.aws

import com.amazonaws.AmazonServiceException
import com.amazonaws.http.{DefaultErrorResponseHandler, HttpResponseHandler}
import com.amazonaws.services.elasticloadbalancing.model.transform._
import com.amazonaws.transform.{Unmarshaller, StandardErrorUnmarshaller}
import org.w3c.dom.Node

package object elasticloadbalancing {

  implicit object ElasticLoadBalancingServiceContext extends AWSServiceContext[ElasticLoadBalancingService] {

    private val exceptionUnmarshallers: java.util.List[Unmarshaller[AmazonServiceException, Node]] = {
      val unmarshallers = new java.util.ArrayList[Unmarshaller[AmazonServiceException, Node]]
      List(
        new UnsupportedProtocolExceptionUnmarshaller,
        new LoadBalancerAttributeNotFoundExceptionUnmarshaller,
        new LoadBalancerNotFoundExceptionUnmarshaller,
        new TooManyLoadBalancersExceptionUnmarshaller,
        new InvalidConfigurationRequestExceptionUnmarshaller,
        new InvalidSecurityGroupExceptionUnmarshaller,
        new DuplicateLoadBalancerNameExceptionUnmarshaller,
        new DependencyThrottleExceptionUnmarshaller,
        new PolicyNotFoundExceptionUnmarshaller,
        new CertificateNotFoundExceptionUnmarshaller,
        new DuplicateTagKeysExceptionUnmarshaller,
        new TooManyTagsExceptionUnmarshaller,
        new ListenerNotFoundExceptionUnmarshaller,
        new TooManyPoliciesExceptionUnmarshaller,
        new DuplicatePolicyNameExceptionUnmarshaller,
        new SubnetNotFoundExceptionUnmarshaller,
        new DuplicateListenerExceptionUnmarshaller,
        new InvalidSchemeExceptionUnmarshaller,
        new PolicyTypeNotFoundExceptionUnmarshaller,
        new InvalidSubnetExceptionUnmarshaller,
        new InvalidInstanceExceptionUnmarshaller,
        new StandardErrorUnmarshaller(
          classOf[com.amazonaws.services.elasticloadbalancing.model.AmazonElasticLoadBalancingException]
        )
      ).foreach(m => unmarshallers.add(m))
      unmarshallers
    }

    override val service: ElasticLoadBalancingService = ElasticLoadBalancingService()

    override val errorResponseHandler: HttpResponseHandler[AmazonServiceException] = new DefaultErrorResponseHandler(
      exceptionUnmarshallers
    )
  }
} 
开发者ID:TanUkkii007,项目名称:akka-http-aws,代码行数:51,代码来源:package.scala


注:本文中的org.w3c.dom.Node类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。