public class BrokerClientPoll
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
GET_EVENTS
Operation bit for "get events".
|
Constructor and Description |
---|
BrokerClientPoll(BrokerClient client,
int requested,
java.lang.Object data)
Create a client poll object.
|
Modifier and Type | Method and Description |
---|---|
BrokerClient |
getBrokerClient()
Get the Broker client.
|
java.lang.Object |
getData()
Get user data.
|
int |
getReady()
Get the poll's ready operations.
|
int |
getRequested()
Get the poll's requested operations.
|
boolean |
getSuspend()
Get the suspend state of this poll object.
|
boolean |
isReady(int operations)
Check if operations are ready.
|
boolean |
isRequested(int operations)
Check if operations are requested.
|
void |
setBrokerClient(BrokerClient client)
Set the Broker client.
|
java.lang.Object |
setData(java.lang.Object data)
Set user data.
|
protected void |
setReady(int ready)
Set the poll's ready operations.
|
protected void |
setRequested(int requested)
Set the poll's requested operations.
|
void |
setSuspend(boolean suspend)
Suspend or unsuspend this poll object.
|
public static final int GET_EVENTS
This operation is ready when BrokerClient.isClientPending() returns true from within BrokerClient.poll().
public BrokerClientPoll(BrokerClient client, int requested, java.lang.Object data) throws BrokerException
Note: Calling BrokerClient.poll on the same BrokerClientPoll object in multiple threads is not supported.
client
- The client to poll.requested
- The requested operations.data
- The user data; may be null.BrokerNullParameterException
- If client is null.BrokerInvalidPollOperationException
- if a requested operation is invalid.BrokerException
public BrokerClient getBrokerClient()
public void setBrokerClient(BrokerClient client) throws BrokerException
client
- The Broker client.BrokerNullParameterException
- If client is null.BrokerException
public int getRequested()
protected void setRequested(int requested) throws BrokerException
requested
- The requested operations.BrokerInvalidPollOperationException
- if a requested operation is invalid.BrokerException
public boolean isRequested(int operations) throws BrokerException
operations
- The operation(s) to check.BrokerInvalidPollOperationException
- if a requested operation is invalid.BrokerException
public int getReady()
protected void setReady(int ready) throws BrokerException
ready
- The ready operations.BrokerInvalidPollOperationException
- if a requested operation is invalid.BrokerException
public boolean isReady(int operations) throws BrokerException
operations
- The operation(s) to check.BrokerInvalidPollOperationException
- if a requested operation is invalid.BrokerException
public java.lang.Object setData(java.lang.Object data)
data
- The user data; may be null.public java.lang.Object getData()
public void setSuspend(boolean suspend)
suspend
- true
to temporarily suspend polling of this object, false
to resume polling.public boolean getSuspend()
true
if this poll object is suspended.
Copyright © 2002-2006 webMethods, Inc. Copyright © 2007-2021 Software AG Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.