Top Description Constructors Methods
sun.nio.ch.sctp

public Class SctpServerChannelImpl

extends SctpServerChannel
Class Inheritance
Imports
com.sun.nio.sctp.SctpChannel, .SctpServerChannel, .SctpSocketOption, java.io.IOException, java.net.InetAddress, .SocketAddress, java.nio.channels.spi.SelectorProvider, java.util.Set

Unimplemented.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public SctpChannel
accept()

Implements abstract com.sun.nio.sctp.SctpServerChannel.accept.

Accepts an association on this channel's socket.
public SctpServerChannel
bind(SocketAddress
The local address to bind the socket, or null to bind the socket to an automatically assigned socket address
local
,
int
The maximum number of pending associations
backlog
)

Implements abstract com.sun.nio.sctp.SctpServerChannel.bind.

Binds the channel's socket to a local address and configures the socket to listen for associations.
public SctpServerChannel
bindAddress(InetAddress
The address to add to the bound addresses for the socket
address
)

Implements abstract com.sun.nio.sctp.SctpServerChannel.bindAddress.

Adds the given address to the bound addresses for the channel's socket.
public Set<SocketAddress>
getAllLocalAddresses()

Implements abstract com.sun.nio.sctp.SctpServerChannel.getAllLocalAddresses.

Returns all of the socket addresses to which this channel's socket is bound.
public <T> T
getOption(SctpSocketOption<T>
The socket option
name
)

Implements abstract com.sun.nio.sctp.SctpServerChannel.getOption.

Returns the value of a socket option.
public void
protected void
implConfigureBlocking(boolean
If true then this channel will be placed in blocking mode; if false then it will be placed non-blocking mode
block
)

Implements abstract java.nio.channels.spi.AbstractSelectableChannel.implConfigureBlocking.

Adjusts this channel's blocking mode.
public <T> SctpServerChannel
setOption(SctpSocketOption<T>
The socket option
name
,
T
The value of the socket option. A value of null may be a valid value for some socket options.
value
)

Implements abstract com.sun.nio.sctp.SctpServerChannel.setOption.

Sets the value of a socket option.
public Set<SctpSocketOption<?>>
supportedOptions()

Implements abstract com.sun.nio.sctp.SctpServerChannel.supportedOptions.

Returns a set of the socket options supported by this channel.
public SctpServerChannel
unbindAddress(InetAddress
The address to remove from the bound addresses for the socket
address
)

Implements abstract com.sun.nio.sctp.SctpServerChannel.unbindAddress.

Removes the given address from the bound addresses for the channel's socket.
Inherited from com.sun.nio.sctp.SctpServerChannel:
bindopenvalidOps

Constructor Detail

SctpServerChannelImplback to summary
public SctpServerChannelImpl(SelectorProvider provider)

Method Detail

acceptback to summary
public SctpChannel accept() throws IOException

Implements abstract com.sun.nio.sctp.SctpServerChannel.accept.

Doc from com.sun.nio.sctp.SctpServerChannel.accept.

Accepts an association on this channel's socket.

If this channel is in non-blocking mode then this method will immediately return null if there are no pending associations. Otherwise it will block indefinitely until a new association is available or an I/O error occurs.

The SCTPChannel returned by this method, if any, will be in blocking mode regardless of the blocking mode of this channel.

If a security manager has been installed then for each new association this method verifies that the address and port number of the assocaitions's remote peer are permitted by the security manager's checkAccept method.

Returns:SctpChannel

The SCTP channel for the new association, or null if this channel is in non-blocking mode and no association is available to be accepted

Annotations
@Override
Exceptions
IOException:
If some other I/O error occurs
bindback to summary
public SctpServerChannel bind(SocketAddress local, int backlog) throws IOException

Implements abstract com.sun.nio.sctp.SctpServerChannel.bind.

Doc from com.sun.nio.sctp.SctpServerChannel.bind.

Binds the channel's socket to a local address and configures the socket to listen for associations.

This method is used to establish a relationship between the socket and the local address. Once a relationship is established then the socket remains bound until the channel is closed. This relationship may not necesssarily be with the address local as it may be removed by unbindAddress, but there will always be at least one local address bound to the channel's socket once an invocation of this method successfully completes.

Once the channel's socket has been successfully bound to a specific address, that is not automatically assigned, more addresses may be bound to it using bindAddress, or removed using unbindAddress.

The backlog parameter is the maximum number of pending associations on the socket. Its exact semantics are implementation specific. An implementation may impose an implementation specific maximum length or may choose to ignore the parameter. If the backlog parameter has the value 0, or a negative value, then an implementation specific default is used.

Parameters
local:SocketAddress

The local address to bind the socket, or null to bind the socket to an automatically assigned socket address

backlog:int

The maximum number of pending associations

Returns:SctpServerChannel

This channel

Annotations
@Override
Exceptions
IOException:
If some other I/O error occurs
bindAddressback to summary
public SctpServerChannel bindAddress(InetAddress address) throws IOException

Implements abstract com.sun.nio.sctp.SctpServerChannel.bindAddress.

Doc from com.sun.nio.sctp.SctpServerChannel.bindAddress.

Adds the given address to the bound addresses for the channel's socket.

The given address must not be the wildcard address. The channel must be first bound using bind before invoking this method, otherwise java.nio.channels.NotYetBoundException is thrown. The bind method takes a SocketAddress as its argument which typically contains a port number as well as an address. Addresses subquently bound using this method are simply addresses as the SCTP port number remains the same for the lifetime of the channel.

New associations accepted after this method successfully completes will be associated with the given address.

Parameters
address:InetAddress

The address to add to the bound addresses for the socket

Returns:SctpServerChannel

This channel

Annotations
@Override
Exceptions
IOException:
If some other I/O error occurs
getAllLocalAddressesback to summary
public Set<SocketAddress> getAllLocalAddresses() throws IOException

Implements abstract com.sun.nio.sctp.SctpServerChannel.getAllLocalAddresses.

Doc from com.sun.nio.sctp.SctpServerChannel.getAllLocalAddresses.

Returns all of the socket addresses to which this channel's socket is bound.

Returns:Set<SocketAddress>

All the socket addresses that this channel's socket is bound to, or an empty Set if the channel's socket is not bound

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
getOptionback to summary
public <T> T getOption(SctpSocketOption<T> name) throws IOException

Implements abstract com.sun.nio.sctp.SctpServerChannel.getOption.

Doc from com.sun.nio.sctp.SctpServerChannel.getOption.

Returns the value of a socket option.

Parameters
<T>
The type of the socket option value
name:SctpSocketOption<T>

The socket option

Returns:T

The value of the socket option. A value of null may be a valid value for some socket options.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
implCloseSelectableChannelback to summary
public void implCloseSelectableChannel() throws IOException

Implements abstract java.nio.channels.spi.AbstractSelectableChannel.implCloseSelectableChannel.

Doc from java.nio.channels.spi.AbstractSelectableChannel.implCloseSelectableChannel.

Closes this selectable channel.

This method is invoked by the close method in order to perform the actual work of closing the channel. This method is only invoked if the channel has not yet been closed, and it is never invoked more than once.

An implementation of this method must arrange for any other thread that is blocked in an I/O operation upon this channel to return immediately, either by throwing an exception or by returning normally.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
implConfigureBlockingback to summary
protected void implConfigureBlocking(boolean block) throws IOException

Implements abstract java.nio.channels.spi.AbstractSelectableChannel.implConfigureBlocking.

Doc from java.nio.channels.spi.AbstractSelectableChannel.implConfigureBlocking.

Adjusts this channel's blocking mode.

This method is invoked by the configureBlocking method in order to perform the actual work of changing the blocking mode. This method is only invoked if the new mode is different from the current mode.

Parameters
block:boolean

If true then this channel will be placed in blocking mode; if false then it will be placed non-blocking mode

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
setOptionback to summary
public <T> SctpServerChannel setOption(SctpSocketOption<T> name, T value) throws IOException

Implements abstract com.sun.nio.sctp.SctpServerChannel.setOption.

Doc from com.sun.nio.sctp.SctpServerChannel.setOption.

Sets the value of a socket option.

Parameters
<T>
The type of the socket option value
name:SctpSocketOption<T>

The socket option

value:T

The value of the socket option. A value of null may be a valid value for some socket options.

Returns:SctpServerChannel

This channel

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
supportedOptionsback to summary
public Set<SctpSocketOption<?>> supportedOptions()

Implements abstract com.sun.nio.sctp.SctpServerChannel.supportedOptions.

Doc from com.sun.nio.sctp.SctpServerChannel.supportedOptions.

Returns a set of the socket options supported by this channel.

This method will continue to return the set of options even after the channel has been closed.

Returns:Set<SctpSocketOption<?>>

A set of the socket options supported by this channel

Annotations
@Override
unbindAddressback to summary
public SctpServerChannel unbindAddress(InetAddress address) throws IOException

Implements abstract com.sun.nio.sctp.SctpServerChannel.unbindAddress.

Doc from com.sun.nio.sctp.SctpServerChannel.unbindAddress.

Removes the given address from the bound addresses for the channel's socket.

The given address must not be the wildcard address. The channel must be first bound using bind before invoking this method, otherwise java.nio.channels.NotYetBoundException is thrown. If this method is invoked on a channel that does not have address as one of its bound addresses, or that has only one local address bound to it, then this method throws IllegalUnbindException. The initial address that the channel's socket is bound to using bind may be removed from the bound addresses for the channel's socket.

New associations accepted after this method successfully completes will not be associated with the given address.

Parameters
address:InetAddress

The address to remove from the bound addresses for the socket

Returns:SctpServerChannel

This channel

Annotations
@Override
Exceptions
IOException:
If some other I/O error occurs