01: /*
02: * ChainBuilder ESB
03: * Visual Enterprise Integration
04: *
05: * Copyright (C) 2007 Bostech Corporation
06: *
07: * This program is free software; you can redistribute it and/or modify it
08: * under the terms of the GNU General Public License as published by the
09: * Free Software Foundation; either version 2 of the License, or (at your option)
10: * any later version.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15: * for more details.
16: *
17: * You should have received a copy of the GNU General Public License along with
18: * this program; if not, write to the Free Software Foundation, Inc.,
19: * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20: *
21: *
22: * $Id: ITcpipContext.java 6426 2007-03-28 12:27:54Z tvolle $
23: */
24: package com.bostechcorp.cbesb.runtime.ccsl.lib;
25:
26: /*
27: * The TCPIP binding component implements this interface and makes it available to
28: * a TCPIP protocol handler. This interface provides container services to the handler.
29: */
30:
31: public interface ITcpipContext {
32:
33: /*
34: * Send data out over the socket. Blocks until data is sent.
35: */
36: public void sendSocket(byte[] bytes) throws Exception;
37:
38: /*
39: * Receive data from the socket. Blocks until some data is
40: * received or the timeout occurs. Throws a socket timeout exception
41: * if a timeout occurs.
42: */
43: public byte[] receiveSocket() throws Exception;
44:
45: /*
46: * Set the socket read timeout in milliseconds.
47: */
48: public void setSocketTimeout(int timeOutMillis);
49:
50: /*
51: * Creates an inbound message exchange using the provided bytes. If the
52: * consumer default-MEP is in-out, it returns the reply message bytes.
53: */
54: public byte[] createInbound(byte[] bytes) throws Exception;
55:
56: /*
57: * This sets the callback method used for processing provider-mode
58: * exchanges. If this is true then the component will call
59: * the process methods with a MessageExchange argument. If this
60: * is false then it will call the methods with a byte array argument.
61: *
62: * Default is false (byte array call).
63: */
64: public void setExchangeBasedProvider(boolean isEnabled);
65:
66: /*
67: * This allows setting the send mode to asynchronous
68: */
69: public void setIsAsyncSend(boolean isAsync);
70:
71: }
|