1 /*
2 * #%L
3 * Receiver.java - mongodb-async-driver - Allanbank Consulting, Inc.
4 * %%
5 * Copyright (C) 2011 - 2014 Allanbank Consulting, Inc.
6 * %%
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * #L%
19 */
20
21 package com.allanbank.mongodb.client.callback;
22
23 /**
24 * Receiver provides an interface for a class that receives messages from the
25 * server so that blocking futures can try and periodically receive messages.
26 *
27 * @copyright 2014, Allanbank Consulting, Inc., All Rights Reserved
28 */
29 public interface Receiver {
30 /**
31 * Tries to receive a message from the server. Every attempt should be made
32 * to not block.
33 */
34 public void tryReceive();
35 }