本文整理了Java中org.apache.dubbo.common.utils.Assert
类的一些代码示例,展示了Assert
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Assert
类的具体详情如下:
包路径:org.apache.dubbo.common.utils.Assert
类名称:Assert
暂无
代码示例来源:origin: apache/incubator-dubbo
public DecodeableRpcResult(Channel channel, Response response, InputStream is, Invocation invocation, byte id) {
Assert.notNull(channel, "channel == null");
Assert.notNull(response, "response == null");
Assert.notNull(is, "inputStream == null");
this.channel = channel;
this.response = response;
this.inputStream = is;
this.invocation = invocation;
this.serializationType = id;
}
代码示例来源:origin: apache/incubator-dubbo
/**
* This constructor create an instance of ConsumerModel and passed objects should not be null.
* If service name, service instance, proxy object,methods should not be null. If these are null
* then this constructor will throw {@link IllegalArgumentException}
* @param serviceName Name of the service.
* @param serviceInterfaceClass Service interface class.
* @param proxyObject Proxy object.
* @param methods Methods of service class
* @param attributes Attributes of methods.
*/
public ConsumerModel(String serviceName
, Class<?> serviceInterfaceClass
, Object proxyObject
, Method[] methods
, Map<String, Object> attributes) {
Assert.notEmptyString(serviceName, "Service name can't be null or blank");
Assert.notNull(serviceInterfaceClass, "Service interface class can't null");
Assert.notNull(proxyObject, "Proxy object can't be null");
Assert.notNull(methods, "Methods can't be null");
this.serviceName = serviceName;
this.serviceInterfaceClass = serviceInterfaceClass;
this.proxyObject = proxyObject;
for (Method method : methods) {
methodModels.put(method, new ConsumerMethodModel(method, attributes));
}
}
代码示例来源:origin: apache/incubator-dubbo
public DecodeableRpcInvocation(Channel channel, Request request, InputStream is, byte id) {
Assert.notNull(channel, "channel == null");
Assert.notNull(request, "request == null");
Assert.notNull(is, "inputStream == null");
this.channel = channel;
this.request = request;
this.inputStream = is;
this.serializationType = id;
}
代码示例来源:origin: apache/incubator-dubbo
/**
* This constructor create an instance of ConsumerModel and passed objects should not be null.
* If service name, service instance, proxy object,methods should not be null. If these are null
* then this constructor will throw {@link IllegalArgumentException}
* @param serviceName Name of the service.
* @param serviceInterfaceClass Service interface class.
* @param proxyObject Proxy object.
* @param methods Methods of service class
* @param attributes Attributes of methods.
*/
public ConsumerModel(String serviceName
, Class<?> serviceInterfaceClass
, Object proxyObject
, Method[] methods
, Map<String, Object> attributes) {
Assert.notEmptyString(serviceName, "Service name can't be null or blank");
Assert.notNull(serviceInterfaceClass, "Service interface class can't null");
Assert.notNull(proxyObject, "Proxy object can't be null");
Assert.notNull(methods, "Methods can't be null");
this.serviceName = serviceName;
this.serviceInterfaceClass = serviceInterfaceClass;
this.proxyObject = proxyObject;
for (Method method : methods) {
methodModels.put(method, new ConsumerMethodModel(method, attributes));
}
}
代码示例来源:origin: apache/incubator-dubbo
public DecodeableRpcInvocation(Channel channel, Request request, InputStream is, byte id) {
Assert.notNull(channel, "channel == null");
Assert.notNull(request, "request == null");
Assert.notNull(is, "inputStream == null");
this.channel = channel;
this.request = request;
this.inputStream = is;
this.serializationType = id;
}
代码示例来源:origin: apache/incubator-dubbo
/**
* @param prefix the prefix of Configuration Properties
* @param beanName the binding Bean Name
*/
public DubboConfigBindingBeanPostProcessor(String prefix, String beanName) {
Assert.notNull(prefix, "The prefix of Configuration Properties must not be null");
Assert.notNull(beanName, "The name of bean must not be null");
this.prefix = prefix;
this.beanName = beanName;
}
代码示例来源:origin: apache/incubator-dubbo
/**
* @param prefix the prefix of Configuration Properties
* @param beanName the binding Bean Name
*/
public DubboConfigBindingBeanPostProcessor(String prefix, String beanName) {
Assert.notNull(prefix, "The prefix of Configuration Properties must not be null");
Assert.notNull(beanName, "The name of bean must not be null");
this.prefix = prefix;
this.beanName = beanName;
}
代码示例来源:origin: apache/incubator-dubbo
protected NativeJavaObjectOutput(ObjectOutputStream out) {
Assert.notNull(out, "output == null");
this.outputStream = out;
}
代码示例来源:origin: apache/incubator-dubbo
public CodecAdapter(Codec codec) {
Assert.notNull(codec, "codec == null");
this.codec = codec;
}
代码示例来源:origin: apache/incubator-dubbo
public NettyBackedChannelBuffer(org.jboss.netty.buffer.ChannelBuffer buffer) {
Assert.notNull(buffer, "buffer == null");
this.buffer = buffer;
}
代码示例来源:origin: apache/incubator-dubbo
protected AbstractChannelHandlerDelegate(ChannelHandler handler) {
Assert.notNull(handler, "handler == null");
this.handler = handler;
}
代码示例来源:origin: apache/incubator-dubbo
protected AbstractChannelHandlerDelegate(ChannelHandler handler) {
Assert.notNull(handler, "handler == null");
this.handler = handler;
}
代码示例来源:origin: apache/incubator-dubbo
protected NativeJavaObjectInput(ObjectInputStream is) {
Assert.notNull(is, "input == null");
inputStream = is;
}
代码示例来源:origin: apache/incubator-dubbo
public DecodeableRpcResult(Channel channel, Response response, InputStream is, Invocation invocation, byte id) {
Assert.notNull(channel, "channel == null");
Assert.notNull(response, "response == null");
Assert.notNull(is, "inputStream == null");
this.channel = channel;
this.response = response;
this.inputStream = is;
this.invocation = invocation;
this.serializationType = id;
}
代码示例来源:origin: apache/incubator-dubbo
public CodecAdapter(Codec codec) {
Assert.notNull(codec, "codec == null");
this.codec = codec;
}
代码示例来源:origin: apache/incubator-dubbo
public NettyBackedChannelBuffer(ByteBuf buffer) {
Assert.notNull(buffer, "buffer == null");
this.buffer = buffer;
}
代码示例来源:origin: apache/incubator-dubbo
public NettyBackedChannelBuffer(org.jboss.netty.buffer.ChannelBuffer buffer) {
Assert.notNull(buffer, "buffer == null");
this.buffer = buffer;
}
代码示例来源:origin: apache/incubator-dubbo
protected NativeJavaObjectOutput(ObjectOutputStream out) {
Assert.notNull(out, "output == null");
this.outputStream = out;
}
代码示例来源:origin: apache/incubator-dubbo
protected NativeJavaObjectInput(ObjectInputStream is) {
Assert.notNull(is, "input == null");
inputStream = is;
}
代码示例来源:origin: apache/incubator-dubbo
public void createEphemeral(String path, String data) {
Assert.notNull(client, new IllegalStateException("Zookeeper is not connected yet!"));
client.createEphemeral(path, data);
}
内容来源于网络,如有侵权,请联系作者删除!