Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.mina.common
Interface BroadcastIoSession

All Superinterfaces:
  IoSession

    public interface BroadcastIoSession

extends IoSession

An `IoSession` for broadcast transports. (e.g. UDP broadcast or multicast)

## Writing Back to the Broadcasting Server

When you implement a client that receives a broadcast message from a server such as DHCP server, the client might need to send a response message for the broadcast message the server sent. Because the remote address of the session is not the address of the server in case of broadcasting, there should be a way to specify the destination when you write the response message. This interface provides `write(Object, SocketAddress)` method so you can specify the destination.

Version:
  $Rev: 555855 $, $Date: 2007-07-13 05:19:00 +0200 (Fri, 13 Jul 2007) $
Author:
  The Apache Directory Project (mina-dev@directory.apache.org)

Method Summary
`WriteFuture` | `write(Object message, SocketAddress destination)` Writes the specified `message` to the specified `destination`.

Methods inherited from interface org.apache.mina.common.IoSession
`close, containsAttribute, getAttachment, getAttribute, getAttributeKeys, getCloseFuture, getConfig, getCreationTime, getFilterChain, getHandler, getIdleCount, getIdleTime, getIdleTimeInMillis, getLastIdleTime, getLastIoTime, getLastReadTime, getLastWriteTime, getLocalAddress, getReadBytes, getReadMessages, getRemoteAddress, getScheduledWriteBytes, getScheduledWriteRequests, getService, getServiceAddress, getServiceConfig, getTrafficMask, getTransportType, getWriteTimeout, getWriteTimeoutInMillis, getWrittenBytes, getWrittenMessages, getWrittenWriteRequests, isClosing, isConnected, isIdle, removeAttribute, resumeRead, resumeWrite, setAttachment, setAttribute, setAttribute, setIdleTime, setTrafficMask, setWriteTimeout, suspendRead, suspendWrite, write`

Method Detail

### write

    WriteFuture write(Object message,
                      SocketAddress destination)

  Writes the specified `message` to the specified `destination`. This operation is asynchronous; `IoHandler.messageSent(IoSession, Object)` will be invoked when the message is actually sent to remote peer. You can also wait for the returned `WriteFuture` if you want to wait for the message actually written.

  Parameters:
    `destination` - `null` if you want the message sent to the default remote address

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2008 Apache MINA Project. All Rights Reserved.