All Downloads are FREE. Search and download functionalities are using the official Maven repository.

swim.api.ws.WsDownlink Maven / Gradle / Ivy

There is a newer version: 4.3.15
Show newest version
// Copyright 2015-2021 Swim Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package swim.api.ws;

import swim.api.Downlink;
import swim.api.function.DidClose;
import swim.api.function.DidConnect;
import swim.api.function.DidDisconnect;
import swim.api.function.DidFail;
import swim.api.ws.function.DidReadFrameWs;
import swim.api.ws.function.DidUpgradeWs;
import swim.api.ws.function.DidWriteFrameWs;
import swim.api.ws.function.DoUpgradeWs;
import swim.api.ws.function.WillReadFrameWs;
import swim.api.ws.function.WillUpgradeWs;
import swim.api.ws.function.WillWriteFrameWs;
import swim.uri.Uri;
import swim.ws.WsControlFrame;
import swim.ws.WsDataFrame;

public interface WsDownlink extends Downlink, WsLink {

  WsDownlink requestUri(Uri requestUri);

  @Override
  WsDownlink observe(Object observer);

  @Override
  WsDownlink unobserve(Object observer);

  WsDownlink willUpgrade(WillUpgradeWs willUpgrade);

  WsDownlink doUpgrade(DoUpgradeWs doUpgrade);

  WsDownlink didUpgrade(DidUpgradeWs didUpgrade);

  WsDownlink willReadFrame(WillReadFrameWs willReadFrame);

  WsDownlink didReadFrame(DidReadFrameWs didReadFrame);

  WsDownlink willWriteFrame(WillWriteFrameWs willWriteFrame);

  WsDownlink didWriteFrame(DidWriteFrameWs didWriteFrame);

  @Override
  WsDownlink didConnect(DidConnect didConnect);

  @Override
  WsDownlink didDisconnect(DidDisconnect didDisconnect);

  @Override
  WsDownlink didClose(DidClose didClose);

  @Override
  WsDownlink didFail(DidFail didFail);

  @Override
  WsDownlink open();

   void write(WsDataFrame frame);

   void write(WsControlFrame frame);

}