|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmicrosoft.exchange.webservices.data.StreamingSubscriptionConnection
public final class StreamingSubscriptionConnection
Represents a connection to an ongoing stream of events.
Nested Class Summary | |
---|---|
static interface |
StreamingSubscriptionConnection.INotificationEventDelegate
|
static interface |
StreamingSubscriptionConnection.ISubscriptionErrorDelegate
|
Constructor Summary | |
---|---|
StreamingSubscriptionConnection(ExchangeService service,
int lifetime)
Initializes a new instance of the StreamingSubscriptionConnection class. |
|
StreamingSubscriptionConnection(ExchangeService service,
java.lang.Iterable<StreamingSubscription> subscriptions,
int lifetime)
Initializes a new instance of the StreamingSubscriptionConnection class. |
Method Summary | |
---|---|
void |
addOnDisconnect(StreamingSubscriptionConnection.ISubscriptionErrorDelegate disconnect)
Set event to happen when property disconnect. |
void |
addOnNotificationEvent(StreamingSubscriptionConnection.INotificationEventDelegate notificationEvent)
Set event to happen when property Notify. |
void |
addOnSubscriptionError(StreamingSubscriptionConnection.ISubscriptionErrorDelegate subscriptionError)
Set event to happen when property subscriptionError. |
void |
addSubscription(StreamingSubscription subscription)
Adds a subscription to this connection. |
void |
clearDisconnect()
* Clears disconnect events list. |
void |
clearNotificationEvent()
* Clears notification events list. |
void |
clearSubscriptionError()
* Clears subscription events list. |
void |
close()
Closes this connection so it stops receiving events from the server.This terminates a long-standing call to EWS. |
void |
dispose()
Frees resources associated with this StreamingSubscriptionConnection. |
protected void |
finalize()
Finalizes an instance of the StreamingSubscriptionConnection class. |
boolean |
getIsOpen()
Gets a value indicating whether this connection is opened |
void |
handleResponseObject(java.lang.Object response)
Callback delegate to handle asynchronous responses. |
void |
hangingRequestDisconnectHandler(java.lang.Object sender,
microsoft.exchange.webservices.data.HangingRequestDisconnectEventArgs args)
Delegate method to handle a hanging request disconnection. |
void |
open()
Opens this connection so it starts receiving events from the server.This results in a long-standing call to EWS. |
void |
removeDisconnect(StreamingSubscriptionConnection.ISubscriptionErrorDelegate disconnect)
Remove the event from happening when property disconnect. |
void |
removeNotificationEvent(StreamingSubscriptionConnection.INotificationEventDelegate notificationEvent)
Remove the event from happening when property Notify. |
void |
removeSubscription(StreamingSubscription subscription)
Removes the specified streaming subscription from the connection. |
void |
removeSubscriptionError(StreamingSubscriptionConnection.ISubscriptionErrorDelegate subscriptionError)
Remove the event from happening when property subscription. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StreamingSubscriptionConnection(ExchangeService service, int lifetime) throws java.lang.Exception
service
- The ExchangeService instance this connection uses to connect
to the server.lifetime
- The maximum time, in minutes, the connection will remain open.
Lifetime must be between 1 and 30.
java.lang.Exception
public StreamingSubscriptionConnection(ExchangeService service, java.lang.Iterable<StreamingSubscription> subscriptions, int lifetime) throws java.lang.Exception
service
- The ExchangeService instance this connection uses to connect
to the server.subscriptions
- Iterable subcriptionslifetime
- The maximum time, in minutes, the connection will remain open.
Lifetime must be between 1 and 30.
java.lang.Exception
Method Detail |
---|
public void addOnNotificationEvent(StreamingSubscriptionConnection.INotificationEventDelegate notificationEvent)
notificationEvent
- notification eventpublic void removeNotificationEvent(StreamingSubscriptionConnection.INotificationEventDelegate notificationEvent)
notificationEvent
- notification eventpublic void clearNotificationEvent()
public void addOnSubscriptionError(StreamingSubscriptionConnection.ISubscriptionErrorDelegate subscriptionError)
subscriptionError
- subscription eventpublic void removeSubscriptionError(StreamingSubscriptionConnection.ISubscriptionErrorDelegate subscriptionError)
subscriptionError
- subscription eventpublic void clearSubscriptionError()
public void addOnDisconnect(StreamingSubscriptionConnection.ISubscriptionErrorDelegate disconnect)
disconnect
- disconnect eventpublic void removeDisconnect(StreamingSubscriptionConnection.ISubscriptionErrorDelegate disconnect)
disconnect
- disconnect eventpublic void clearDisconnect()
public void addSubscription(StreamingSubscription subscription) throws java.lang.Exception
subscription
- The subscription to add.
java.lang.Exception
Thrown
- when AddSubscription is called while connected.public void removeSubscription(StreamingSubscription subscription) throws java.lang.Exception
subscription
- The subscription to remove.
java.lang.Exception
Thrown
- when RemoveSubscription is called while connected.public void open() throws ServiceLocalException, java.lang.Exception
java.lang.Exception
ServiceLocalException
Thrown
- when Open is called while connected.public void close()
close
in interface java.io.Closeable
Thrown
- when Close is called while not connected.public boolean getIsOpen() throws java.lang.Exception
java.lang.Exception
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public void dispose()
public void handleResponseObject(java.lang.Object response) throws ArgumentException
response
- Response received from the server
ArgumentException
public void hangingRequestDisconnectHandler(java.lang.Object sender, microsoft.exchange.webservices.data.HangingRequestDisconnectEventArgs args)
sender
- The object invoking the delegate.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |